Spaces:
Sleeping
Sleeping
Update app.py
Browse files33 unmodified lines3435363738394011 unmodified lines5253545556575833 unmodified linesframes = frame_capture(video_path)images = [PIL.Image.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)) for frame in frames]prompt = "Describe what is happening in each of these frames."images_with_prompt = [prompt] + imagesresponses = model.generate_content(images_with_prompt)11 unmodified linesoutput_text = gr.Textbox(label="What's in this video")# Create Gradio appgr.Interface(fn=generate_descriptions_for_frames, inputs=video_input, outputs=output_text, title="Video Content Detection System").launch()33 unmodified lines3435363738394011 unmodified lines5253545556575833 unmodified linesframes = frame_capture(video_path)images = [PIL.Image.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)) for frame in frames]prompt = "Describe what is happening in each of these frames in this video sequentially."images_with_prompt = [prompt] + imagesresponses = model.generate_content(images_with_prompt)11 unmodified linesoutput_text = gr.Textbox(label="What's in this video")# Create Gradio appgr.Interface(fn=generate_descriptions_for_frames, inputs=video_input, outputs=output_text, title="Video Analysis System").launch()
app.py+2-2