Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,8 @@ num_videos = len(bench)
|
|
| 12 |
|
| 13 |
prompts = ds.load_dataset(
|
| 14 |
"meta-ai-for-media-research/movie_gen_video_bench",
|
| 15 |
-
split="test"
|
|
|
|
| 16 |
)
|
| 17 |
prompts = [p["prompt"] for p in prompts][:num_videos]
|
| 18 |
|
|
@@ -35,7 +36,7 @@ with gr.Blocks() as demo:
|
|
| 35 |
)
|
| 36 |
|
| 37 |
def set_video(new_prompt):
|
| 38 |
-
new_id = prompts.
|
| 39 |
return gr.Video(
|
| 40 |
value=bench[new_id]["video"]["path"],
|
| 41 |
loop=True,
|
|
@@ -43,7 +44,7 @@ with gr.Blocks() as demo:
|
|
| 43 |
)
|
| 44 |
|
| 45 |
def decrement(current_prompt):
|
| 46 |
-
current_id = prompts.
|
| 47 |
return gr.Dropdown(
|
| 48 |
label="Video",
|
| 49 |
choices=prompts,
|
|
@@ -51,7 +52,7 @@ with gr.Blocks() as demo:
|
|
| 51 |
)
|
| 52 |
|
| 53 |
def increment(current_prompt):
|
| 54 |
-
current_id = prompts.
|
| 55 |
return gr.Dropdown(
|
| 56 |
label="Video",
|
| 57 |
choices=prompts,
|
|
|
|
| 12 |
|
| 13 |
prompts = ds.load_dataset(
|
| 14 |
"meta-ai-for-media-research/movie_gen_video_bench",
|
| 15 |
+
split="test",
|
| 16 |
+
streaming=True
|
| 17 |
)
|
| 18 |
prompts = [p["prompt"] for p in prompts][:num_videos]
|
| 19 |
|
|
|
|
| 36 |
)
|
| 37 |
|
| 38 |
def set_video(new_prompt):
|
| 39 |
+
new_id = prompts.index(new_prompt)
|
| 40 |
return gr.Video(
|
| 41 |
value=bench[new_id]["video"]["path"],
|
| 42 |
loop=True,
|
|
|
|
| 44 |
)
|
| 45 |
|
| 46 |
def decrement(current_prompt):
|
| 47 |
+
current_id = prompts.index(current_prompt)
|
| 48 |
return gr.Dropdown(
|
| 49 |
label="Video",
|
| 50 |
choices=prompts,
|
|
|
|
| 52 |
)
|
| 53 |
|
| 54 |
def increment(current_prompt):
|
| 55 |
+
current_id = prompts.index(current_prompt)
|
| 56 |
return gr.Dropdown(
|
| 57 |
label="Video",
|
| 58 |
choices=prompts,
|