matjarm commited on
Commit
8bc9a6b
·
1 Parent(s): 9d46b1d
Files changed (1) hide show
  1. app.py +20 -17
app.py CHANGED
@@ -70,23 +70,26 @@ def process_video(video_path):
70
  def generate_captions(video):
71
  # Save uploaded video
72
  video_path = f"temp_{uuid.uuid4()}.mp4"
73
- with open(video_path, "wb") as f:
74
- f.write(video.read())
75
-
76
- # Process video and get captions
77
- captions = process_video(video_path)
78
-
79
- # Clean up temporary file
80
- os.remove(video_path)
81
-
82
- # Format output for display
83
- result = ""
84
- for model_name, model_captions in captions.items():
85
- result += f"### {model_name}\n"
86
- result += "\n".join(f"- {caption}" for caption in model_captions)
87
- result += "\n\n"
88
-
89
- return result
 
 
 
90
 
91
 
92
  # Gradio UI
 
70
  def generate_captions(video):
71
  # Save uploaded video
72
  video_path = f"temp_{uuid.uuid4()}.mp4"
73
+ print(video)
74
+ print("LOG")
75
+ # with open(video_path, "wb") as f:
76
+ # f.write(video.read())
77
+
78
+ # # Process video and get captions
79
+ # captions = process_video(video_path)
80
+
81
+ # # Clean up temporary file
82
+ # os.remove(video_path)
83
+
84
+ # # Format output for display
85
+ # result = ""
86
+ # for model_name, model_captions in captions.items():
87
+ # result += f"### {model_name}\n"
88
+ # result += "\n".join(f"- {caption}" for caption in model_captions)
89
+ # result += "\n\n"
90
+
91
+ # return result
92
+ return ""
93
 
94
 
95
  # Gradio UI