hra commited on
Commit
e49fa15
1 Parent(s): 831acb3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -51,7 +51,7 @@ HF_TOKEN=API_TOKEN# token where you deployed your endpoint
51
 
52
  def generate_image(prompt_SD:str):
53
  print(prompt_SD)
54
- payload = {"inputs": prompt_SD,}
55
  headers = {
56
  "Authorization": f"Bearer {HF_TOKEN}",
57
  "Content-Type": "application/json",
@@ -74,7 +74,7 @@ def infer(prompt,
74
  greedy_decoding = False,
75
  return_full_text = False):
76
 
77
- print(seed)
78
  top_k = None if top_k == 0 else top_k
79
  do_sample = False if num_beams > 0 else not greedy_decoding
80
  num_beams = None if (greedy_decoding or num_beams == 0) else num_beams
 
51
 
52
  def generate_image(prompt_SD:str):
53
  print(prompt_SD)
54
+ payload = {"inputs": prompt_SD,"seed":random.randint(0,100)}
55
  headers = {
56
  "Authorization": f"Bearer {HF_TOKEN}",
57
  "Content-Type": "application/json",
 
74
  greedy_decoding = False,
75
  return_full_text = False):
76
 
77
+
78
  top_k = None if top_k == 0 else top_k
79
  do_sample = False if num_beams > 0 else not greedy_decoding
80
  num_beams = None if (greedy_decoding or num_beams == 0) else num_beams