Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -62,12 +62,12 @@ def process_pdf_and_ask_question(pdf_file,question):
|
|
62 |
|
63 |
# Process the question
|
64 |
res = chain({"question": question})
|
65 |
-
|
66 |
|
67 |
app=gr.Interface(fn=process_pdf_and_ask_question,
|
68 |
inputs=[gr.File(file_count="single", type="filepath"), gr.Textbox(lines=2, placeholder="Ask a question...")],
|
69 |
outputs="text",
|
70 |
-
|
71 |
description="Upload a PDF and ask questions about it.",
|
72 |
|
73 |
)
|
|
|
62 |
|
63 |
# Process the question
|
64 |
res = chain({"question": question})
|
65 |
+
return res["answer"]
|
66 |
|
67 |
app=gr.Interface(fn=process_pdf_and_ask_question,
|
68 |
inputs=[gr.File(file_count="single", type="filepath"), gr.Textbox(lines=2, placeholder="Ask a question...")],
|
69 |
outputs="text",
|
70 |
+
title="PDF Q&A",
|
71 |
description="Upload a PDF and ask questions about it.",
|
72 |
|
73 |
)
|