Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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([
|
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, [
|
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()
|