AlexMia commited on
Commit
7b9bbdd
·
verified ·
1 Parent(s): aa74a15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -58,7 +58,7 @@ with gr.Blocks() as demo:
58
  chatbot = gr.Chatbot(type="messages")
59
  chat_input = gr.Textbox(placeholder="Sende eine Nachricht...", lines=1, max_lines=6, show_label=False, elem_id="chat_input")
60
  audio_response = gr.Checkbox(label="Audio Antwort generieren?", value=False)
61
- clear = gr.ClearButton([msg, chatbot])
62
 
63
  def respond(message, chat_history):
64
  bot_message = random.choice(["How are you?", "Today is a great day", "I'm very hungry"])
@@ -67,6 +67,6 @@ with gr.Blocks() as demo:
67
  time.sleep(2)
68
  return "", chat_history
69
 
70
- chat_input.submit(respond, [msg, chatbot, audio_response], [msg, chatbot, audio_response], api_name="llm_inference")
71
 
72
  demo.launch()
 
58
  chatbot = gr.Chatbot(type="messages")
59
  chat_input = gr.Textbox(placeholder="Sende eine Nachricht...", lines=1, max_lines=6, show_label=False, elem_id="chat_input")
60
  audio_response = gr.Checkbox(label="Audio Antwort generieren?", value=False)
61
+ clear = gr.ClearButton([chat_input, chatbot, audio_response], show_api=False)
62
 
63
  def respond(message, chat_history):
64
  bot_message = random.choice(["How are you?", "Today is a great day", "I'm very hungry"])
 
67
  time.sleep(2)
68
  return "", chat_history
69
 
70
+ chat_input.submit(respond, [chat_input, chatbot, audio_response], [chat_input, chatbot, audio_response], api_name="llm_inference")
71
 
72
  demo.launch()