KingNish commited on
Commit
e399fb6
·
verified ·
1 Parent(s): d4a75c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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, model, transcribe, search
6
  from live_chat import videochat
7
 
8
  # Define Gradio theme
@@ -77,10 +77,9 @@ with gr.Blocks(
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
86
  with gr.Blocks() as livechat:
 
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
 
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="User Input", sources="microphone", type="filepath")
81
+ output = gr.Audio(label="AI", autoplay=True)
82
+ gr.Interface(fn=respond, inputs=[input, web_search], outputs=[output], live=True)
 
83
 
84
  # Live chat block
85
  with gr.Blocks() as livechat: