HuzaifaTech commited on
Commit
8cbfc80
·
verified ·
1 Parent(s): 9787256

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -130,8 +130,7 @@ def chat(user_message, history):
130
  if history is None:
131
  history = []
132
 
133
- history.append({"role": "user", "content": user_message})
134
- history.append({"role": "assistant", "content": response})
135
 
136
  return history, history
137
 
@@ -146,7 +145,7 @@ with gr.Blocks() as app:
146
  file = gr.File(label="Upload PDF")
147
  status = gr.Textbox(label="Status")
148
 
149
- chatbot = gr.Chatbot(type="messages") # IMPORTANT FIX
150
  msg = gr.Textbox(placeholder="Ask your question...")
151
  state = gr.State([])
152
 
 
130
  if history is None:
131
  history = []
132
 
133
+ history.append((user_message, response))
 
134
 
135
  return history, history
136
 
 
145
  file = gr.File(label="Upload PDF")
146
  status = gr.Textbox(label="Status")
147
 
148
+ chatbot = gr.Chatbot() # IMPORTANT FIX
149
  msg = gr.Textbox(placeholder="Ask your question...")
150
  state = gr.State([])
151