Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -509,11 +509,11 @@ with gr.Blocks(theme='rawrsor1/Everforest') as demo:
|
|
509 |
|
510 |
|
511 |
|
512 |
-
with gr.Column():
|
513 |
-
|
514 |
|
515 |
-
with gr.Column():
|
516 |
-
|
517 |
|
518 |
def setup_ui():
|
519 |
state = gr.State()
|
@@ -553,49 +553,14 @@ with gr.Blocks(theme='rawrsor1/Everforest') as demo:
|
|
553 |
#bot_msg.then(generate_audio_elevenlabs, chatbot, audio_output)
|
554 |
bot_msg_audio = bot_msg.then(lambda history: generate_audio_elevenlabs(history[-1][1]), chatbot, audio_output)
|
555 |
with gr.Column():
|
556 |
-
gr.Markdown("<h1>Local Events</h1>", elem_id="events-markdown")
|
557 |
|
558 |
-
news_output = gr.HTML(value=fetch_local_events())
|
559 |
|
560 |
setup_ui()
|
561 |
|
562 |
|
563 |
-
|
564 |
-
# state = gr.State()
|
565 |
-
# with gr.Row():
|
566 |
-
# with gr.Column():
|
567 |
-
# gr.Markdown("Choose the prompt")
|
568 |
-
# choice = gr.Radio(label="Choose a prompt", choices=["Details", "Conversational"], value="Details")
|
569 |
-
|
570 |
-
# with gr.Column(): # Larger scale for the right column
|
571 |
-
# gr.Markdown("Enter the query / Voice Output")
|
572 |
-
# chat_input = gr.Textbox(show_copy_button=True, interactive=True, show_label=False, label="Transcription")
|
573 |
-
# chat_msg = chat_input.submit(add_message, [chatbot, chat_input], [chatbot, chat_input])
|
574 |
-
# bot_msg = chat_msg.then(bot, [chatbot, choice], chatbot, api_name="bot_response")
|
575 |
-
# bot_msg.then(lambda: gr.Textbox(value="", interactive=True, placeholder="Enter message or upload file...", show_label=False), None, [chat_input])
|
576 |
-
# chatbot.like(print_like_dislike, None, None)
|
577 |
-
# clear_button = gr.Button("Clear")
|
578 |
-
# clear_button.click(fn=clear_textbox, inputs=None, outputs=chat_input)
|
579 |
-
|
580 |
-
# with gr.Column(): # Smaller scale for the left column
|
581 |
-
# gr.Markdown("Stream your Voice")
|
582 |
-
# audio_input = gr.Audio(sources=["microphone"], streaming=True, type='numpy')
|
583 |
-
# audio_input.stream(transcribe_function, inputs=[state, audio_input], outputs=[state, chat_input], api_name="SAMLOne_real_time")
|
584 |
-
|
585 |
-
# with gr.Row():
|
586 |
-
# with gr.Column():
|
587 |
-
# gr.Markdown("Locate the Events")
|
588 |
-
# location_output = gr.HTML()
|
589 |
-
# bot_msg.then(show_map_if_details, [chatbot, choice], [location_output, location_output])
|
590 |
-
# with gr.Column():
|
591 |
-
# gr.Markdown("Listen the audio")
|
592 |
-
# audio_output = gr.Audio()
|
593 |
-
# #bot_msg.then(generate_audio_elevenlabs, chatbot, audio_output)
|
594 |
-
# bot_msg_audio = bot_msg.then(lambda history: generate_audio_elevenlabs(history[-1][1]), chatbot, audio_output)
|
595 |
-
# with gr.Column():
|
596 |
-
# news_output = gr.HTML(value=fetch_local_events())
|
597 |
-
|
598 |
-
# setup_ui()
|
599 |
|
600 |
demo.queue()
|
601 |
demo.launch(share=True)
|
|
|
509 |
|
510 |
|
511 |
|
512 |
+
# with gr.Column():
|
513 |
+
# weather_output = gr.HTML(value=fetch_local_weather())
|
514 |
|
515 |
+
# with gr.Column():
|
516 |
+
# news_output = gr.HTML(value=fetch_local_news())
|
517 |
|
518 |
def setup_ui():
|
519 |
state = gr.State()
|
|
|
553 |
#bot_msg.then(generate_audio_elevenlabs, chatbot, audio_output)
|
554 |
bot_msg_audio = bot_msg.then(lambda history: generate_audio_elevenlabs(history[-1][1]), chatbot, audio_output)
|
555 |
with gr.Column():
|
556 |
+
# gr.Markdown("<h1>Local Events</h1>", elem_id="events-markdown")
|
557 |
|
558 |
+
# news_output = gr.HTML(value=fetch_local_events())
|
559 |
|
560 |
setup_ui()
|
561 |
|
562 |
|
563 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
564 |
|
565 |
demo.queue()
|
566 |
demo.launch(share=True)
|