Zeph27 commited on
Commit
92a36c1
Β·
1 Parent(s): 3acf5a0
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -90,10 +90,9 @@ def analyze_video(prompt, video):
90
  os.remove(audio_path)
91
 
92
  context = [
93
- {"role": "assistant", "content": f"Transcription of the video: {transcription}"},
94
- {"role": "user", "content": [prompt] + encoded_video}
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="What is the video about?")
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")