Spaces:
Build error
Build error
updated app
Browse files
app.py
CHANGED
@@ -200,8 +200,9 @@ def video_inference(
|
|
200 |
|
201 |
upload = True
|
202 |
|
203 |
-
def toggle_webcam():
|
204 |
-
|
|
|
205 |
|
206 |
description = """<p style='text-align: center'> Create a personal avatar from just a single image using ROME. <br> <a href='https://arxiv.org/abs/2206.08343' target='_blank'>Paper</a> | <a href='https://samsunglabs.github.io/rome' target='_blank'>Project Page</a> | <a href='https://github.com/SamsungLabs/rome' target='_blank'>Github</a> </p>"""
|
207 |
quote = """
|
@@ -240,6 +241,6 @@ with gr.Blocks() as demo:
|
|
240 |
|
241 |
image_button.click(image_inference, inputs=[source_img, driver_img], outputs=image_output)
|
242 |
video_button.click(video_inference, inputs=[source_img2, driver_vid], outputs=video_output)
|
243 |
-
toggle_cam.click(toggle_webcam)
|
244 |
|
245 |
demo.launch()
|
|
|
200 |
|
201 |
upload = True
|
202 |
|
203 |
+
def toggle_webcam(toggle):
|
204 |
+
global upload
|
205 |
+
upload = not toggle
|
206 |
|
207 |
description = """<p style='text-align: center'> Create a personal avatar from just a single image using ROME. <br> <a href='https://arxiv.org/abs/2206.08343' target='_blank'>Paper</a> | <a href='https://samsunglabs.github.io/rome' target='_blank'>Project Page</a> | <a href='https://github.com/SamsungLabs/rome' target='_blank'>Github</a> </p>"""
|
208 |
quote = """
|
|
|
241 |
|
242 |
image_button.click(image_inference, inputs=[source_img, driver_img], outputs=image_output)
|
243 |
video_button.click(video_inference, inputs=[source_img2, driver_vid], outputs=video_output)
|
244 |
+
toggle_cam.click(toggle_webcam, inputs=[upload])
|
245 |
|
246 |
demo.launch()
|