ritchi1 commited on
Commit
dac5276
·
verified ·
1 Parent(s): 04a3e68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -24,11 +24,11 @@ def summarize_pdf(pdf_file):
24
  except Exception as e:
25
  return f"❌ An error occurred: {str(e)}"
26
 
27
- # Create the Gradio interface
28
  interface = gr.Interface(
29
  fn=summarize_pdf,
30
- inputs=gr.inputs.File(label="Upload PDF"),
31
- outputs=gr.outputs.Textbox(label="Summary"),
32
  title="PDF Summarizer",
33
  description="Upload a PDF file to extract and summarize its content using state-of-the-art AI."
34
  )
 
24
  except Exception as e:
25
  return f"❌ An error occurred: {str(e)}"
26
 
27
+ # Update Gradio interface to use the new syntax
28
  interface = gr.Interface(
29
  fn=summarize_pdf,
30
+ inputs=gr.File(label="Upload PDF"), # Updated to gr.File
31
+ outputs=gr.Textbox(label="Summary"), # Updated to gr.Textbox
32
  title="PDF Summarizer",
33
  description="Upload a PDF file to extract and summarize its content using state-of-the-art AI."
34
  )