sarasad commited on
Commit
43eaa84
·
1 Parent(s): 83f3123

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -38,7 +38,7 @@ def generate_response(text, minimum_length, p, temperature):
38
  # description = 'This demo is for a BERT2BERT model trained for single-turn open-domain empathetic dialogue response generation in Modern Standard Arabic'
39
 
40
  with gr.Blocks() as demo:
41
- with gr.Column():
42
  gr.Markdown("Empathetic Response Generation in Arabic")
43
  chatbot = gr.Chatbot()
44
  output_slider=gr.Slider(5, 20, step=1, label='Minimum Output Length')
@@ -48,9 +48,9 @@ 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
- with gr.Row():
52
- msg = gr.Textbox(width=0.8)
53
- submit_button=gr.Button(label="Enter",width=0.2)
54
  clear = gr.Button("Clear")
55
  msg.submit(respond, [msg, chatbot,output_slider,top_p_slider,temperature_slider], [msg, chatbot])
56
  submit_button.click(respond, [msg, chatbot,output_slider,top_p_slider,temperature_slider], [msg, chatbot])
 
38
  # description = 'This demo is for a BERT2BERT model trained for single-turn open-domain empathetic dialogue response generation in Modern Standard Arabic'
39
 
40
  with gr.Blocks() as demo:
41
+
42
  gr.Markdown("Empathetic Response Generation in Arabic")
43
  chatbot = gr.Chatbot()
44
  output_slider=gr.Slider(5, 20, step=1, label='Minimum Output Length')
 
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
+
52
+ msg = gr.Textbox(placeholder="Send a message")
53
+
54
  clear = gr.Button("Clear")
55
  msg.submit(respond, [msg, chatbot,output_slider,top_p_slider,temperature_slider], [msg, chatbot])
56
  submit_button.click(respond, [msg, chatbot,output_slider,top_p_slider,temperature_slider], [msg, chatbot])