Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
#
|
28 |
interface = gr.Interface(
|
29 |
fn=summarize_pdf,
|
30 |
-
inputs=gr.
|
31 |
-
outputs=gr.
|
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 |
)
|