Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,9 +23,9 @@ def generate_video(image):
|
|
23 |
response.raise_for_status()
|
24 |
response_body = response.json()
|
25 |
|
26 |
-
#
|
27 |
-
|
28 |
-
return
|
29 |
|
30 |
# Create a Gradio interface with a heading
|
31 |
def create_interface():
|
@@ -34,8 +34,8 @@ def create_interface():
|
|
34 |
# Gradio Interface
|
35 |
iface = gr.Interface(
|
36 |
fn=generate_video,
|
37 |
-
inputs=gr.
|
38 |
-
outputs=gr.
|
39 |
title=title,
|
40 |
description="Upload a product shot to generate a moving video version of it."
|
41 |
)
|
|
|
23 |
response.raise_for_status()
|
24 |
response_body = response.json()
|
25 |
|
26 |
+
# Assuming the response contains a URL to the generated video
|
27 |
+
video_url = response_body.get('video_url')
|
28 |
+
return video_url
|
29 |
|
30 |
# Create a Gradio interface with a heading
|
31 |
def create_interface():
|
|
|
34 |
# Gradio Interface
|
35 |
iface = gr.Interface(
|
36 |
fn=generate_video,
|
37 |
+
inputs=gr.Image(type="file", label="Upload Your Product Image"),
|
38 |
+
outputs=gr.Video(label="Generated Product Video"), # Use gr.Video to display the video output
|
39 |
title=title,
|
40 |
description="Upload a product shot to generate a moving video version of it."
|
41 |
)
|