hareballak commited on
Commit
26ee315
·
verified ·
1 Parent(s): 756ab53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -58,7 +58,7 @@ def get_bot_response(query):
58
  return "மன்னிக்கவும், நான் இந்த கேள்விக்கு பதில் தர முடியவில்லை."
59
 
60
  # Gradio interface function
61
- def chatbot(audio, message, history, system_message, max_tokens, temperature, top_p):
62
  if audio is not None:
63
  # Save the audio file temporarily
64
  with open("temp.wav", "wb") as f:
@@ -82,7 +82,6 @@ demo = gr.Interface(
82
  inputs=[
83
  gr.Audio(type="numpy", label="Speak to the Bot",recording=True), # Adjusted for microphone input
84
  gr.Textbox(value="How can I help you?", label="Text Input (optional)"),
85
- gr.State(), # Use this for tracking conversation state if necessary
86
  gr.Textbox(value="You are a friendly chatbot.", label="System message"),
87
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
88
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
 
58
  return "மன்னிக்கவும், நான் இந்த கேள்விக்கு பதில் தர முடியவில்லை."
59
 
60
  # Gradio interface function
61
+ def chatbot(audio, message, system_message, max_tokens, temperature, top_p):
62
  if audio is not None:
63
  # Save the audio file temporarily
64
  with open("temp.wav", "wb") as f:
 
82
  inputs=[
83
  gr.Audio(type="numpy", label="Speak to the Bot",recording=True), # Adjusted for microphone input
84
  gr.Textbox(value="How can I help you?", label="Text Input (optional)"),
 
85
  gr.Textbox(value="You are a friendly chatbot.", label="System message"),
86
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
87
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),