os1187 commited on
Commit
fa7dedf
1 Parent(s): 1ea5637

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,7 +23,7 @@ css = """
23
 
24
  # Define layout with custom styles
25
  layout = [
26
- gr.Row([gr.File(label="Upload PDF", type="file")]),
27
  gr.Row([gr.Button("Generate Insights")]),
28
  gr.Row([gr.Textbox("Placeholder for PDF insights", label="Insights", type="text")])
29
  ]
@@ -92,7 +92,7 @@ def process_pdf_and_generate_response(pdf_file):
92
 
93
  iface = gr.Interface(
94
  fn=process_pdf_and_generate_response,
95
- inputs=gr.File(label="Upload PDF", type="binary"), # Changed 'file' to 'binary'
96
  outputs=gr.Textbox("Placeholder for PDF insights", label="Insights", type="text"),
97
  title="pdf-chatbot",
98
  description="Upload a PDF and receive insights based on its content.",
 
23
 
24
  # Define layout with custom styles
25
  layout = [
26
+ gr.Row([gr.File(label="Upload PDF", type="binary")]), # Corrected 'type' parameter
27
  gr.Row([gr.Button("Generate Insights")]),
28
  gr.Row([gr.Textbox("Placeholder for PDF insights", label="Insights", type="text")])
29
  ]
 
92
 
93
  iface = gr.Interface(
94
  fn=process_pdf_and_generate_response,
95
+ inputs=gr.File(label="Upload PDF", type="binary"), # Corrected 'type' parameter
96
  outputs=gr.Textbox("Placeholder for PDF insights", label="Insights", type="text"),
97
  title="pdf-chatbot",
98
  description="Upload a PDF and receive insights based on its content.",