plebias commited on
Commit
e6fa7ee
·
verified ·
1 Parent(s): 5b66561

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -825,7 +825,7 @@ async def change_accordion(x):
825
  isOpen = True
826
  actionables, folium_map = await a_disseminate_actions(x)
827
  if folium_map == None:
828
- return (gr.Accordion("Recommendations output (NOTE: unable to determine incident location)", visible=isOpen), gr.Textbox(visible=False) , \
829
  folium.Map(location=[1.2879, 103.8517], zoom_start=12), \
830
  actionables['SCDF']["actionables"], actionables['LTA']["actionables"], actionables['Traffic Police']["actionables"])
831
  # return gr.Accordion("Image Location", open=isOpen), map_out
@@ -861,7 +861,7 @@ with gr.Blocks(js=js) as demo:
861
  gr.Markdown("Emergency Responder Copilot Demonstrator")
862
  isOpen = False
863
 
864
- outs_textbox = gr.Textbox("Recommendations outputs will appear here once summary is generated from audio transcript.",lines=1,max_lines=1, autoscroll = False, show_label= False)
865
  with gr.Accordion("Recommendations output and Locations on Map", open=True, visible = isOpen) as img:
866
  with gr.Row():
867
  recc_textbox1 = gr.Textbox(label="SCDF", max_lines=10, show_copy_button=True, autoscroll = False)
@@ -901,6 +901,8 @@ with gr.Blocks(js=js) as demo:
901
  )
902
  # trans_textbox.change(lambda x: gr.Tab("Summarisation from Audio"), inputs=[trans_textbox], outputs=[tab2], scroll_to_output = True)
903
 
 
 
904
 
905
 
906
  summ_textbox.change(change_accordion, inputs=[summ_textbox], outputs=[img, outs_textbox, map_gr, recc_textbox1,recc_textbox2, recc_textbox3], scroll_to_output = True)
 
825
  isOpen = True
826
  actionables, folium_map = await a_disseminate_actions(x)
827
  if folium_map == None:
828
+ return (gr.Accordion("Recommendations output", visible=isOpen), gr.Textbox(visible=False) , \
829
  folium.Map(location=[1.2879, 103.8517], zoom_start=12), \
830
  actionables['SCDF']["actionables"], actionables['LTA']["actionables"], actionables['Traffic Police']["actionables"])
831
  # return gr.Accordion("Image Location", open=isOpen), map_out
 
861
  gr.Markdown("Emergency Responder Copilot Demonstrator")
862
  isOpen = False
863
 
864
+ outs_textbox = gr.Textbox("Recommendations outputs will appear here once summary is generated from audio transcript.\n",lines=1,max_lines=1, autoscroll = False, show_label= False)
865
  with gr.Accordion("Recommendations output and Locations on Map", open=True, visible = isOpen) as img:
866
  with gr.Row():
867
  recc_textbox1 = gr.Textbox(label="SCDF", max_lines=10, show_copy_button=True, autoscroll = False)
 
901
  )
902
  # trans_textbox.change(lambda x: gr.Tab("Summarisation from Audio"), inputs=[trans_textbox], outputs=[tab2], scroll_to_output = True)
903
 
904
+ gr.Textbox("[1] You may click on one of the examples to load our existing examples. Alternatively, you may record your own incident for demonstration purposes using the Record button. Include any details about which junction/road the accident occured or nearby landmarks.\n[2] If you recorded your own incident, click Submit button to generate a transcript of the call.\n[3] Once the transcript has been generated and appears on the right side, click the Summarisation from Transcript tab.\n[4] Click submit to generate an Incident Summary Report. Once this is complete, please wait momentarily while recommendations for action are generated.", autoscroll = False, show_label= True, label='Instructions for use:')
905
+
906
 
907
 
908
  summ_textbox.change(change_accordion, inputs=[summ_textbox], outputs=[img, outs_textbox, map_gr, recc_textbox1,recc_textbox2, recc_textbox3], scroll_to_output = True)