KingNish commited on
Commit
d899029
·
verified ·
1 Parent(s): c87c622

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -150,6 +150,7 @@ def chat_document_v2(file, question):
150
  """
151
 
152
  all_answers_str = "\n".join(all_answers)
 
153
  summary_message = f"""[INST] {summary_prompt}
154
  {all_answers_str[:30000]}
155
  Summary:"""
@@ -175,7 +176,7 @@ with gr.Blocks() as demo:
175
  iface2 = gr.Interface(
176
  fn=chat_document,
177
  inputs=[gr.File(label="Upload a Document"), gr.Textbox(label="Question")],
178
- outputs=gr.Textbox(label="Answer"),
179
  title="Document Chat",
180
  description="Upload a document and ask questions about its content."
181
  )
@@ -183,7 +184,7 @@ with gr.Blocks() as demo:
183
  iface3 = gr.Interface(
184
  fn=chat_document_v2,
185
  inputs=[gr.File(label="Upload a Document"), gr.Textbox(label="Question")],
186
- outputs=gr.Textbox(label="Answer"),
187
  title="Document Chat V2",
188
  description="Upload a document and ask questions about its content (using chunk-based approach)."
189
  )
 
150
  """
151
 
152
  all_answers_str = "\n".join(all_answers)
153
+ print(all_answers_str)
154
  summary_message = f"""[INST] {summary_prompt}
155
  {all_answers_str[:30000]}
156
  Summary:"""
 
176
  iface2 = gr.Interface(
177
  fn=chat_document,
178
  inputs=[gr.File(label="Upload a Document"), gr.Textbox(label="Question")],
179
+ outputs=gr.Markdown(label="Answer"),
180
  title="Document Chat",
181
  description="Upload a document and ask questions about its content."
182
  )
 
184
  iface3 = gr.Interface(
185
  fn=chat_document_v2,
186
  inputs=[gr.File(label="Upload a Document"), gr.Textbox(label="Question")],
187
+ outputs=gr.Markdown(label="Answer"),
188
  title="Document Chat V2",
189
  description="Upload a document and ask questions about its content (using chunk-based approach)."
190
  )