Pijush2023 commited on
Commit
e977eaf
·
verified ·
1 Parent(s): 1d8404d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -605,14 +605,14 @@ with gr.Blocks(theme='rawrsor1/Everforest') as demo:
605
 
606
 
607
 
608
- def setup_ui():
609
- state = gr.State()
610
- with gr.Row():
611
- with gr.Column():
612
- gr.Markdown("<h1>Select Style</h1>", elem_id="prompt-markdown")
613
- choice = gr.Radio(label="Select Style", choices=["Details", "Conversational"], value="Conversational")
614
- with gr.Column(): # Larger scale for the right column
615
- gr.Markdown("<h1>Ask Radar !!!</h1>", elem_id="query-markdown")
616
 
617
  #chat_input = gr.Textbox(show_copy_button=True, interactive=True, show_label=False, label="ASK Radar !!!")
618
  #chat_msg = chat_input.submit(add_message, [chatbot, chat_input], [chatbot, chat_input])
@@ -622,16 +622,16 @@ with gr.Blocks(theme='rawrsor1/Everforest') as demo:
622
  # clear_button = gr.Button("Clear")
623
  # clear_button.click(fn=clear_textbox, inputs=None, outputs=chat_input)
624
 
625
- with gr.Column(): # Smaller scale for the left column
626
- gr.Markdown("<h1>Talk to RADAR</h1>", elem_id="voice-markdown")
627
- audio_input = gr.Audio(sources=["microphone"], streaming=True, type='numpy')
628
- audio_input.stream(transcribe_function, inputs=[state, audio_input], outputs=[state, chat_input], api_name="SAMLOne_real_time")
629
-
630
- with gr.Row():
631
- with gr.Column():
632
- gr.Markdown("<h1>Map</h1>", elem_id="location-markdown")
633
- location_output = gr.HTML()
634
- bot_msg.then(show_map_if_details, [chatbot, choice], [location_output, location_output])
635
 
636
  # do not uncomment
637
  # with gr.Column():
@@ -647,7 +647,7 @@ with gr.Blocks(theme='rawrsor1/Everforest') as demo:
647
  # with gr.Column():
648
 
649
 
650
- setup_ui()
651
  demo.queue()
652
  demo.launch(share=True)
653
 
 
605
 
606
 
607
 
608
+ # def setup_ui():
609
+ # state = gr.State()
610
+ # with gr.Row():
611
+ # with gr.Column():
612
+ # gr.Markdown("<h1>Select Style</h1>", elem_id="prompt-markdown")
613
+ # choice = gr.Radio(label="Select Style", choices=["Details", "Conversational"], value="Conversational")
614
+ # with gr.Column(): # Larger scale for the right column
615
+ # gr.Markdown("<h1>Ask Radar !!!</h1>", elem_id="query-markdown")
616
 
617
  #chat_input = gr.Textbox(show_copy_button=True, interactive=True, show_label=False, label="ASK Radar !!!")
618
  #chat_msg = chat_input.submit(add_message, [chatbot, chat_input], [chatbot, chat_input])
 
622
  # clear_button = gr.Button("Clear")
623
  # clear_button.click(fn=clear_textbox, inputs=None, outputs=chat_input)
624
 
625
+ # with gr.Column(): # Smaller scale for the left column
626
+ # gr.Markdown("<h1>Talk to RADAR</h1>", elem_id="voice-markdown")
627
+ # audio_input = gr.Audio(sources=["microphone"], streaming=True, type='numpy')
628
+ # audio_input.stream(transcribe_function, inputs=[state, audio_input], outputs=[state, chat_input], api_name="SAMLOne_real_time")
629
+
630
+ # with gr.Row():
631
+ # with gr.Column():
632
+ # gr.Markdown("<h1>Map</h1>", elem_id="location-markdown")
633
+ # location_output = gr.HTML()
634
+ # bot_msg.then(show_map_if_details, [chatbot, choice], [location_output, location_output])
635
 
636
  # do not uncomment
637
  # with gr.Column():
 
647
  # with gr.Column():
648
 
649
 
650
+ # setup_ui()
651
  demo.queue()
652
  demo.launch(share=True)
653