Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -131,7 +131,7 @@ def tok(txt):
|
|
131 |
print(toks)
|
132 |
return toks
|
133 |
|
134 |
-
def main(p1,p2
|
135 |
p1_en = translate(p1,"english")
|
136 |
p2_en = translate(p2,"english")
|
137 |
p = {"a":p1_en,"b":p2_en}
|
@@ -236,7 +236,7 @@ def ui():
|
|
236 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
237 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
238 |
|
239 |
-
run_button.click(fn=main,inputs=[prompt,prompt2
|
240 |
demo.queue().launch(server_port=int(os.getenv("CUSTOM_PORT")))
|
241 |
|
242 |
if __name__ == "__main__":
|
|
|
131 |
print(toks)
|
132 |
return toks
|
133 |
|
134 |
+
def main(p1,p2,*result):
|
135 |
p1_en = translate(p1,"english")
|
136 |
p2_en = translate(p2,"english")
|
137 |
p = {"a":p1_en,"b":p2_en}
|
|
|
236 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
237 |
result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
|
238 |
|
239 |
+
run_button.click(fn=main,inputs=[prompt,prompt2,*result],outputs=result)
|
240 |
demo.queue().launch(server_port=int(os.getenv("CUSTOM_PORT")))
|
241 |
|
242 |
if __name__ == "__main__":
|