Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -563,12 +563,15 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 563 |
final_video_output = gr.Video(label="A Obra-Prima Final")
|
| 564 |
|
| 565 |
# ... (Markdown de explicação da Arquitetura) ...
|
| 566 |
-
|
| 567 |
def process_and_run_storyboard(num_fragments, prompt, gallery_files, keyframe_resolution):
|
| 568 |
if not gallery_files:
|
| 569 |
raise gr.Error("Por favor, suba pelo menos uma imagem de referência na galeria.")
|
| 570 |
|
| 571 |
-
|
|
|
|
|
|
|
|
|
|
| 572 |
processed_paths = []
|
| 573 |
for i, path in enumerate(raw_paths):
|
| 574 |
filename = f"processed_ref_{i}_{keyframe_resolution}x{keyframe_resolution}.png"
|
|
@@ -590,6 +593,9 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 590 |
outputs=[keyframe_log_output, keyframe_gallery_output, keyframe_images_state]
|
| 591 |
)
|
| 592 |
|
|
|
|
|
|
|
|
|
|
| 593 |
def updated_animator_click(
|
| 594 |
video_resolution,
|
| 595 |
video_duration_seconds, video_fps, eco_video_frames, use_attention_slicing,
|
|
|
|
| 563 |
final_video_output = gr.Video(label="A Obra-Prima Final")
|
| 564 |
|
| 565 |
# ... (Markdown de explicação da Arquitetura) ...
|
| 566 |
+
# --- Lógica de Conexão dos Componentes ---
|
| 567 |
def process_and_run_storyboard(num_fragments, prompt, gallery_files, keyframe_resolution):
|
| 568 |
if not gallery_files:
|
| 569 |
raise gr.Error("Por favor, suba pelo menos uma imagem de referência na galeria.")
|
| 570 |
|
| 571 |
+
# --- CORREÇÃO AQUI ---
|
| 572 |
+
# O componente Gallery retorna uma lista de tuplas (filepath, label).
|
| 573 |
+
# Acessamos o caminho do arquivo com o índice [0].
|
| 574 |
+
raw_paths = [item[0] for item in gallery_files]
|
| 575 |
processed_paths = []
|
| 576 |
for i, path in enumerate(raw_paths):
|
| 577 |
filename = f"processed_ref_{i}_{keyframe_resolution}x{keyframe_resolution}.png"
|
|
|
|
| 593 |
outputs=[keyframe_log_output, keyframe_gallery_output, keyframe_images_state]
|
| 594 |
)
|
| 595 |
|
| 596 |
+
|
| 597 |
+
|
| 598 |
+
|
| 599 |
def updated_animator_click(
|
| 600 |
video_resolution,
|
| 601 |
video_duration_seconds, video_fps, eco_video_frames, use_attention_slicing,
|