Kaixuanliu commited on
Commit
81351b9
1 Parent(s): f552bec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -34,10 +34,10 @@ def process_image_from_binary(img_stream):
34
 
35
  return img
36
 
37
- def generate_img(concept, prompt):
38
  print(f"my IP is {myip}, my port is {myport}")
39
  response = requests.post('http://{}:{}/generate'.format(myip, myport),
40
- json={"concept": concept, "prompt": prompt},
41
  timeout=(10, 1200))
42
  print(f"result: {response}")
43
  image = None
@@ -73,6 +73,6 @@ with gr.Blocks() as demo:
73
  with gr.Column(min_width=512):
74
  result_img = gr.Image(label="Image Gnerated by AdvUnlearn",width=512,show_share_button=False,show_download_button=False)
75
 
76
- start_button.click(fn=generate_img, inputs=[drop_text, text_input], outputs=result_img, api_name="generate")
77
 
78
  demo.launch()
 
34
 
35
  return img
36
 
37
+ def generate_img(concept, prompt, seed, steps):
38
  print(f"my IP is {myip}, my port is {myport}")
39
  response = requests.post('http://{}:{}/generate'.format(myip, myport),
40
+ json={"concept": concept, "prompt": prompt, "seed": seed, "steps": steps},
41
  timeout=(10, 1200))
42
  print(f"result: {response}")
43
  image = None
 
73
  with gr.Column(min_width=512):
74
  result_img = gr.Image(label="Image Gnerated by AdvUnlearn",width=512,show_share_button=False,show_download_button=False)
75
 
76
+ start_button.click(fn=generate_img, inputs=[drop_text, text_input, seed, steps], outputs=result_img, api_name="generate")
77
 
78
  demo.launch()