plebias commited on
Commit
aad53f4
·
verified ·
1 Parent(s): c3128bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -9
app.py CHANGED
@@ -851,15 +851,7 @@ with gr.Blocks(js=js) as demo:
851
  # summ_textbox = gr.Textbox('Summary')
852
  gr.Markdown("Emergency Responder Copilot Demonstrator")
853
  isOpen = False
854
- 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)
855
- with gr.Accordion("Recommendations output and Locations on Map", open=True, visible = isOpen) as img:
856
- with gr.Row():
857
- recc_textbox1 = gr.Textbox(label="SCDF", max_lines=8, show_copy_button=True, autoscroll = False)
858
- recc_textbox2 = gr.Textbox(label="LTA", max_lines=8, show_copy_button=True, autoscroll = False)
859
- recc_textbox3 = gr.Textbox(label="Traffic Police", max_lines=8, show_copy_button=True, autoscroll = False)
860
- # gr.Markdown(loc)
861
- map_gr = Folium(value=folium.Map(location=[1.2879, 103.8517], zoom_start=12), height=400)
862
-
863
  with gr.Tab("Transcript Generator from Audio"):
864
  input_audio = gr.Audio(
865
  sources=["microphone"],
@@ -890,6 +882,18 @@ with gr.Blocks(js=js) as demo:
890
  allow_flagging = 'never'
891
  )
892
  # trans_textbox.change(lambda x: gr.Tab("Summarisation from Audio"), inputs=[trans_textbox], outputs=[tab2], scroll_to_output = True)
 
 
 
 
 
 
 
 
 
 
 
 
893
  summ_textbox.change(change_accordion, inputs=[summ_textbox], outputs=[img, outs_textbox, map_gr, recc_textbox1,recc_textbox2, recc_textbox3], scroll_to_output = True)
894
 
895
  demo.launch(debug = True)
 
851
  # summ_textbox = gr.Textbox('Summary')
852
  gr.Markdown("Emergency Responder Copilot Demonstrator")
853
  isOpen = False
854
+
 
 
 
 
 
 
 
 
855
  with gr.Tab("Transcript Generator from Audio"):
856
  input_audio = gr.Audio(
857
  sources=["microphone"],
 
882
  allow_flagging = 'never'
883
  )
884
  # trans_textbox.change(lambda x: gr.Tab("Summarisation from Audio"), inputs=[trans_textbox], outputs=[tab2], scroll_to_output = True)
885
+
886
+ 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)
887
+ with gr.Accordion("Recommendations output and Locations on Map", open=True, visible = isOpen) as img:
888
+ with gr.Row():
889
+ recc_textbox1 = gr.Textbox(label="SCDF", max_lines=8, show_copy_button=True, autoscroll = False)
890
+ recc_textbox2 = gr.Textbox(label="LTA", max_lines=8, show_copy_button=True, autoscroll = False)
891
+ recc_textbox3 = gr.Textbox(label="Traffic Police", max_lines=8, show_copy_button=True, autoscroll = False)
892
+ # gr.Markdown(loc)
893
+ map_gr = Folium(value=folium.Map(location=[1.2879, 103.8517], zoom_start=12), height=400)
894
+
895
+
896
+
897
  summ_textbox.change(change_accordion, inputs=[summ_textbox], outputs=[img, outs_textbox, map_gr, recc_textbox1,recc_textbox2, recc_textbox3], scroll_to_output = True)
898
 
899
  demo.launch(debug = True)