Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,8 @@ def generate_response(text, minimum_length, p, temperature):
|
|
40 |
with gr.Blocks() as demo:
|
41 |
|
42 |
gr.Markdown("Empathetic Response Generation in Arabic")
|
43 |
-
chatbot = gr.Chatbot().style(height=650)
|
|
|
44 |
output_slider=gr.Slider(5, 20, step=1, label='Minimum Output Length')
|
45 |
top_p_slider=gr.Slider(0.7, 1, step=0.1, label='Top-P')
|
46 |
temperature_slider=gr.Slider(1, 3, step=0.1, label='Temperature')
|
@@ -48,7 +49,6 @@ with gr.Blocks() as demo:
|
|
48 |
bot_message = generate_response(message,output_slider,top_p_slider,temperature_slider)
|
49 |
chat_history.append((message, bot_message))
|
50 |
return "", chat_history
|
51 |
-
msg = gr.Textbox(placeholder="Send a message").style(container=False)
|
52 |
clear = gr.Button("Clear")
|
53 |
msg.submit(respond, [msg, chatbot,output_slider,top_p_slider,temperature_slider], [msg, chatbot])
|
54 |
clear.click(lambda: None, None, chatbot, queue=False)
|
|
|
40 |
with gr.Blocks() as demo:
|
41 |
|
42 |
gr.Markdown("Empathetic Response Generation in Arabic")
|
43 |
+
chatbot = gr.Chatbot(show_label=False).style(height=650)
|
44 |
+
msg = gr.Textbox(placeholder="Send a message",show_label=False).style(container=False)
|
45 |
output_slider=gr.Slider(5, 20, step=1, label='Minimum Output Length')
|
46 |
top_p_slider=gr.Slider(0.7, 1, step=0.1, label='Top-P')
|
47 |
temperature_slider=gr.Slider(1, 3, step=0.1, label='Temperature')
|
|
|
49 |
bot_message = generate_response(message,output_slider,top_p_slider,temperature_slider)
|
50 |
chat_history.append((message, bot_message))
|
51 |
return "", chat_history
|
|
|
52 |
clear = gr.Button("Clear")
|
53 |
msg.submit(respond, [msg, chatbot,output_slider,top_p_slider,temperature_slider], [msg, chatbot])
|
54 |
clear.click(lambda: None, None, chatbot, queue=False)
|