tomerk commited on
Commit
ef1bbc9
·
verified ·
1 Parent(s): 4af8daa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -270,6 +270,11 @@ def stop_capture_func():
270
  global stop_capture
271
  stop_capture = True
272
 
 
 
 
 
 
273
  # Gradio interface
274
  with gr.Blocks(title="Conntour", fill_height=True) as demo:
275
  with gr.Row():
@@ -280,5 +285,6 @@ with gr.Blocks(title="Conntour", fill_height=True) as demo:
280
  stop_btn = gr.Button("Stop")
281
  start_btn.click(analyze_stream, inputs=[prompt, chatbot], outputs=[chatbot], queue=True)
282
  stop_btn.click(stop_capture_func)
 
283
 
284
  demo.launch(favicon_path='favicon.ico', auth=(user_name, password))
 
270
  global stop_capture
271
  stop_capture = True
272
 
273
+ def get_time():
274
+ global base_start_time
275
+ base_start_time = time.time()
276
+ print("NEW BASE TIME", base_start_time)
277
+
278
  # Gradio interface
279
  with gr.Blocks(title="Conntour", fill_height=True) as demo:
280
  with gr.Row():
 
285
  stop_btn = gr.Button("Stop")
286
  start_btn.click(analyze_stream, inputs=[prompt, chatbot], outputs=[chatbot], queue=True)
287
  stop_btn.click(stop_capture_func)
288
+ demo.load(get_time, inputs=None, outputs=None, _js=on_load)
289
 
290
  demo.launch(favicon_path='favicon.ico', auth=(user_name, password))