Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -180,7 +180,9 @@ def create_interface():
|
|
| 180 |
gr.Markdown("### 📥 Output")
|
| 181 |
|
| 182 |
status_output = gr.Textbox(label="Status", lines=3, interactive=False)
|
| 183 |
-
|
|
|
|
|
|
|
| 184 |
|
| 185 |
with gr.Accordion("📋 Processing Log", open=False):
|
| 186 |
log_output = gr.Textbox(label="Log", lines=10, interactive=False)
|
|
@@ -190,13 +192,12 @@ def create_interface():
|
|
| 190 |
# Event handler
|
| 191 |
def on_process(video, api_key, domain, num_clips, duration, ref_img, prompt):
|
| 192 |
clips, status, logs = process_video(video, api_key, domain, num_clips, duration, ref_img, prompt)
|
| 193 |
-
|
| 194 |
-
return status, gallery_items, logs
|
| 195 |
|
| 196 |
process_btn.click(
|
| 197 |
fn=on_process,
|
| 198 |
inputs=[video_input, api_key_input, domain_dropdown, num_clips_slider, duration_slider, reference_image, custom_prompt],
|
| 199 |
-
outputs=[status_output,
|
| 200 |
)
|
| 201 |
|
| 202 |
return demo
|
|
|
|
| 180 |
gr.Markdown("### 📥 Output")
|
| 181 |
|
| 182 |
status_output = gr.Textbox(label="Status", lines=3, interactive=False)
|
| 183 |
+
|
| 184 |
+
# Output clips as downloadable files
|
| 185 |
+
clip_files = gr.Files(label="Extracted Clips")
|
| 186 |
|
| 187 |
with gr.Accordion("📋 Processing Log", open=False):
|
| 188 |
log_output = gr.Textbox(label="Log", lines=10, interactive=False)
|
|
|
|
| 192 |
# Event handler
|
| 193 |
def on_process(video, api_key, domain, num_clips, duration, ref_img, prompt):
|
| 194 |
clips, status, logs = process_video(video, api_key, domain, num_clips, duration, ref_img, prompt)
|
| 195 |
+
return status, clips, logs
|
|
|
|
| 196 |
|
| 197 |
process_btn.click(
|
| 198 |
fn=on_process,
|
| 199 |
inputs=[video_input, api_key_input, domain_dropdown, num_clips_slider, duration_slider, reference_image, custom_prompt],
|
| 200 |
+
outputs=[status_output, clip_files, log_output],
|
| 201 |
)
|
| 202 |
|
| 203 |
return demo
|