Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -290,37 +290,31 @@ def status_check():
|
|
| 290 |
return "Processing is complete! Check the logs for details."
|
| 291 |
|
| 292 |
if __name__ == "__main__":
|
| 293 |
-
|
| 294 |
-
IN = 'input_videos'
|
| 295 |
OUT = 'output_results'
|
| 296 |
-
|
| 297 |
os.makedirs(IN, exist_ok=True)
|
| 298 |
os.makedirs(OUT, exist_ok=True)
|
| 299 |
-
|
| 300 |
videos = sorted(glob.glob(os.path.join(IN, '*.mp4')))
|
| 301 |
-
|
| 302 |
if len(videos) == 0:
|
| 303 |
-
print("No videos found
|
| 304 |
else:
|
| 305 |
print(f'Found {len(videos)} videos')
|
|
|
|
|
|
|
| 306 |
|
| 307 |
-
|
| 308 |
-
process(v, OUT)
|
| 309 |
-
|
| 310 |
-
# --- FIX THIS LINE ---
|
| 311 |
-
print('\nALL DONE')
|
| 312 |
-
|
| 313 |
-
# --- AND THESE LINES ---
|
| 314 |
import gradio as gr
|
| 315 |
demo = gr.Interface(
|
| 316 |
-
fn=lambda: "
|
| 317 |
inputs=[],
|
| 318 |
-
outputs=gr.FileExplorer(root_dir="output_results"
|
| 319 |
-
title="
|
| 320 |
)
|
| 321 |
-
|
| 322 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
|
|
|
|
|
| 290 |
return "Processing is complete! Check the logs for details."
|
| 291 |
|
| 292 |
if __name__ == "__main__":
|
| 293 |
+
IN = 'input_videos'
|
|
|
|
| 294 |
OUT = 'output_results'
|
|
|
|
| 295 |
os.makedirs(IN, exist_ok=True)
|
| 296 |
os.makedirs(OUT, exist_ok=True)
|
| 297 |
+
|
| 298 |
videos = sorted(glob.glob(os.path.join(IN, '*.mp4')))
|
| 299 |
+
|
| 300 |
if len(videos) == 0:
|
| 301 |
+
print("No videos found.")
|
| 302 |
else:
|
| 303 |
print(f'Found {len(videos)} videos')
|
| 304 |
+
for v in videos:
|
| 305 |
+
process(v, OUT)
|
| 306 |
|
| 307 |
+
print('\nALL DONE')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 308 |
import gradio as gr
|
| 309 |
demo = gr.Interface(
|
| 310 |
+
fn=lambda: "Complete!",
|
| 311 |
inputs=[],
|
| 312 |
+
outputs=gr.FileExplorer(root_dir="output_results"),
|
| 313 |
+
title="Results"
|
| 314 |
)
|
|
|
|
| 315 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
+
|