tomerk commited on
Commit
72440bc
·
verified ·
1 Parent(s): ae6987b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -20
app.py CHANGED
@@ -255,25 +255,14 @@ def stop_capture_func():
255
 
256
  # Gradio interface
257
  with gr.Blocks(title="Conntour", fill_height=True) as demo:
258
- with gr.Tab("Analyze"):
259
- with gr.Row():
260
- video = gr.Video(label="Video Source")
261
- with gr.Column():
262
- chatbot = gr.Chatbot(label="Events", bubble_full_width=False, avatar_images=AVATARS)
263
- prompt = gr.Textbox(label="Enter your prompt alert")
264
- start_btn = gr.Button("Start")
265
- stop_btn = gr.Button("Stop")
266
- start_btn.click(analyze_video_file, inputs=[prompt, video, chatbot], outputs=[chatbot], queue=True)
267
- stop_btn.click(stop_capture_func)
268
- with gr.Tab("Alerts"):
269
- with gr.Row():
270
- stream = gr.Textbox(label="Video Source", value="https://streamapi2.eu.loclx.io/video_feed/101 OR rtsp://admin:[email protected]:5678/Streaming/Channels/101")
271
- with gr.Column():
272
- chatbot = gr.Chatbot(label="Events", bubble_full_width=False, avatar_images=AVATARS)
273
- prompt = gr.Textbox(label="Enter your prompt alert")
274
- start_btn = gr.Button("Start")
275
- stop_btn = gr.Button("Stop")
276
- start_btn.click(analyze_stream, inputs=[prompt, stream, chatbot], outputs=[chatbot], queue=True)
277
- stop_btn.click(stop_capture_func)
278
 
279
  demo.launch(favicon_path='favicon.ico', auth=(user_name, password))
 
255
 
256
  # Gradio interface
257
  with gr.Blocks(title="Conntour", fill_height=True) as demo:
258
+ with gr.Row():
259
+ stream = "https://streamapi2.eu.loclx.io/video_feed/101"
260
+ with gr.Column():
261
+ chatbot = gr.Chatbot(label="Events", bubble_full_width=False, avatar_images=AVATARS)
262
+ prompt = gr.Textbox(label="Enter your prompt alert")
263
+ start_btn = gr.Button("Start")
264
+ stop_btn = gr.Button("Stop")
265
+ start_btn.click(analyze_stream, inputs=[prompt, stream, chatbot], outputs=[chatbot], queue=True)
266
+ stop_btn.click(stop_capture_func)
 
 
 
 
 
 
 
 
 
 
 
267
 
268
  demo.launch(favicon_path='favicon.ico', auth=(user_name, password))