Rahatara commited on
Commit
6517f50
·
verified ·
1 Parent(s): 0e1249d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,7 +34,7 @@ def generate_descriptions_for_frames(video_path):
34
  frames = frame_capture(video_path)
35
  images = [PIL.Image.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)) for frame in frames]
36
 
37
- prompt = "Describe what is happening in each of these frames in this video sequentially."
38
  images_with_prompt = [prompt] + images
39
 
40
  responses = model.generate_content(images_with_prompt)
@@ -67,7 +67,7 @@ with gr.Blocks() as tab1:
67
  with gr.Column():
68
  gr.Markdown("### Video Analysis System")
69
  video_input_1 = gr.Video(label="Upload Video", autoplay=True)
70
- output_text = gr.Textbox(label="What's in this video")
71
  analyze_button = gr.Button("Analyze Video")
72
  analyze_button.click(fn=generate_descriptions_for_frames, inputs=video_input_1, outputs=output_text)
73
 
 
34
  frames = frame_capture(video_path)
35
  images = [PIL.Image.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)) for frame in frames]
36
 
37
+ prompt = "Describe what is happening in each of these frame. Identify any protetial railway defect or risk."
38
  images_with_prompt = [prompt] + images
39
 
40
  responses = model.generate_content(images_with_prompt)
 
67
  with gr.Column():
68
  gr.Markdown("### Video Analysis System")
69
  video_input_1 = gr.Video(label="Upload Video", autoplay=True)
70
+ output_text = gr.Textbox(label="What's this video")
71
  analyze_button = gr.Button("Analyze Video")
72
  analyze_button.click(fn=generate_descriptions_for_frames, inputs=video_input_1, outputs=output_text)
73