Yaron Koresh commited on
Commit
86e141f
·
verified ·
1 Parent(s): 8aec9cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -183,7 +183,6 @@ def infer2(p):
183
  return "_"+name
184
 
185
  def run1(p1,p2,*result):
186
- global out1
187
 
188
  p1_en = translate(p1,"english")
189
  p2_en = translate(p2,"english")
@@ -199,8 +198,9 @@ def run1(p1,p2,*result):
199
  pool1.join()
200
  pool1.clear()
201
 
 
 
202
  def run2(p1,p2,*result):
203
- global out1
204
 
205
  p1_en = translate(p1,"english")
206
  p2_en = translate(p2,"english")
@@ -255,7 +255,7 @@ def main():
255
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
256
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
257
 
258
- run_button.click(fn=run1,inputs=[prompt,prompt2,*result]).then(fn=run2,inputs=[prompt,prompt2,*result],outputs=result)
259
  demo.queue().launch()
260
 
261
  if __name__ == "__main__":
 
183
  return "_"+name
184
 
185
  def run1(p1,p2,*result):
 
186
 
187
  p1_en = translate(p1,"english")
188
  p2_en = translate(p2,"english")
 
198
  pool1.join()
199
  pool1.clear()
200
 
201
+ return out1
202
+
203
  def run2(p1,p2,*result):
 
204
 
205
  p1_en = translate(p1,"english")
206
  p2_en = translate(p2,"english")
 
255
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
256
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
257
 
258
+ run_button.click(fn=run1,inputs=[prompt,prompt2,*result],outputs=result).then(fn=run2,inputs=[prompt,prompt2,*result],outputs=result)
259
  demo.queue().launch()
260
 
261
  if __name__ == "__main__":