Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ import gradio as gr
|
|
| 2 |
|
| 3 |
# Import modules from other files
|
| 4 |
from chatbot import chatbot, model_inference, BOT_AVATAR, EXAMPLES, model_selector, decoding_strategy, temperature, max_new_tokens, repetition_penalty, top_p
|
| 5 |
-
from voice_chat import respond
|
| 6 |
from live_chat import videochat
|
| 7 |
|
| 8 |
# Define Gradio theme
|
|
@@ -76,10 +76,10 @@ with gr.Blocks(
|
|
| 76 |
# Voice chat block
|
| 77 |
with gr.Blocks() as voice:
|
| 78 |
with gr.Row():
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
gr.
|
| 82 |
-
|
| 83 |
|
| 84 |
|
| 85 |
# Live chat block
|
|
|
|
| 2 |
|
| 3 |
# Import modules from other files
|
| 4 |
from chatbot import chatbot, model_inference, BOT_AVATAR, EXAMPLES, model_selector, decoding_strategy, temperature, max_new_tokens, repetition_penalty, top_p
|
| 5 |
+
from voice_chat import respond, model, transcribe, search
|
| 6 |
from live_chat import videochat
|
| 7 |
|
| 8 |
# Define Gradio theme
|
|
|
|
| 76 |
# Voice chat block
|
| 77 |
with gr.Blocks() as voice:
|
| 78 |
with gr.Row():
|
| 79 |
+
web_search = gr.Checkbox(label="Web Search", value=False)
|
| 80 |
+
input = gr.Audio(label="Voice Chat", sources="microphone")
|
| 81 |
+
output = gr.Audio(label="AI",autoplay=True)
|
| 82 |
+
gr.Interface(fn=respond, inputs=[input, web_search], outputs=[output], live=True, batch=True, max_batch_size=20, delete_cache=(60,60))
|
| 83 |
|
| 84 |
|
| 85 |
# Live chat block
|