Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -90,10 +90,9 @@ def analyze_video(prompt, video):
|
|
90 |
os.remove(audio_path)
|
91 |
|
92 |
context = [
|
93 |
-
{"role": "
|
94 |
-
{"role": "
|
95 |
]
|
96 |
-
|
97 |
params = {
|
98 |
'sampling': True,
|
99 |
'top_p': 0.8,
|
@@ -118,7 +117,7 @@ with gr.Blocks() as demo:
|
|
118 |
gr.Markdown("# Video Analyzer")
|
119 |
with gr.Row():
|
120 |
with gr.Column():
|
121 |
-
prompt_input = gr.Textbox(label="Prompt", value="
|
122 |
video_input = gr.Video(label="Upload Video")
|
123 |
with gr.Column():
|
124 |
analysis_result = gr.Textbox(label="Analysis Result")
|
|
|
90 |
os.remove(audio_path)
|
91 |
|
92 |
context = [
|
93 |
+
{"role": "user", "content": [prompt] + encoded_video},
|
94 |
+
{"role": "assistant", "content": f"Transcription of the video: {transcription}"}
|
95 |
]
|
|
|
96 |
params = {
|
97 |
'sampling': True,
|
98 |
'top_p': 0.8,
|
|
|
117 |
gr.Markdown("# Video Analyzer")
|
118 |
with gr.Row():
|
119 |
with gr.Column():
|
120 |
+
prompt_input = gr.Textbox(label="Prompt", value="Analyze this video, give me advice on how to improve it")
|
121 |
video_input = gr.Video(label="Upload Video")
|
122 |
with gr.Column():
|
123 |
analysis_result = gr.Textbox(label="Analysis Result")
|