Pclanglais commited on
Commit
ac64212
1 Parent(s): 7f1183e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -165,7 +165,6 @@ def user(message, history):
165
  history_transformer_format = history + [[message, ""]]
166
 
167
  print(history_transformer_format)
168
- source_text = "<h3>Sources</h3><p>" + source_text + "</p>"
169
  return "", history_transformer_format, source_text
170
 
171
  # Define the Gradio interface
@@ -180,7 +179,8 @@ examples = [
180
 
181
  with gr.Blocks() as demo:
182
  with gr.Row():
183
- with gr.Column(scale=2):
 
184
  chatbot = gr.Chatbot()
185
  msg = gr.Textbox()
186
  clear = gr.Button("Clear")
@@ -188,6 +188,7 @@ with gr.Blocks() as demo:
188
  history = gr.State()
189
 
190
  with gr.Column(scale=1):
 
191
  user_output = gr.HTML() # To display the user's message
192
 
193
  msg.submit(user, inputs=[msg, chatbot], outputs=[msg, chatbot, user_output], queue=False).then(
 
165
  history_transformer_format = history + [[message, ""]]
166
 
167
  print(history_transformer_format)
 
168
  return "", history_transformer_format, source_text
169
 
170
  # Define the Gradio interface
 
179
 
180
  with gr.Blocks() as demo:
181
  with gr.Row():
182
+ with gr.Column(scale=2):
183
+ gr.HTML("<h2>Chat</2>")
184
  chatbot = gr.Chatbot()
185
  msg = gr.Textbox()
186
  clear = gr.Button("Clear")
 
188
  history = gr.State()
189
 
190
  with gr.Column(scale=1):
191
+ gr.HTML("<h2>Source utilisée</2>")
192
  user_output = gr.HTML() # To display the user's message
193
 
194
  msg.submit(user, inputs=[msg, chatbot], outputs=[msg, chatbot, user_output], queue=False).then(