Harsha909 commited on
Commit
6cce066
·
verified ·
1 Parent(s): 85366a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -17
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
- # Ensure all these lines are aligned under the 'i' of 'if'
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 in 'input_videos' folder.")
304
  else:
305
  print(f'Found {len(videos)} videos')
 
 
306
 
307
- for v in videos:
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: "Processing Complete!",
317
  inputs=[],
318
- outputs=gr.FileExplorer(root_dir="output_results", label="Click to Download Files"),
319
- title="Pose Normalization Results"
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
+