Spaces:
Runtime error
Runtime error
updated app.py Input
Browse fileshttps://huggingface.co/spaces/fffiloni/langchain-chat-with-pdf/blob/main/app.py
app.py
CHANGED
|
@@ -22,12 +22,10 @@ Upload your pdf, ask your questions and wait for the magic to happen.
|
|
| 22 |
DISCLAIMER: I do no have idea what happens to the pdfs that you upload and who has access to them so make sure there is nothing confidential there.
|
| 23 |
"""
|
| 24 |
title = "QA answering from a pdf."
|
| 25 |
-
|
| 26 |
iface = gr.Interface(
|
| 27 |
fn=predict,
|
| 28 |
-
inputs=[
|
| 29 |
-
gr.inputs.File(),
|
| 30 |
-
],
|
| 31 |
outputs="text",
|
| 32 |
description=description,
|
| 33 |
title=title,
|
|
|
|
| 22 |
DISCLAIMER: I do no have idea what happens to the pdfs that you upload and who has access to them so make sure there is nothing confidential there.
|
| 23 |
"""
|
| 24 |
title = "QA answering from a pdf."
|
| 25 |
+
pdf_doc=gr.File(label="Load a pdf", file_types=['.pdf'], type="file")
|
| 26 |
iface = gr.Interface(
|
| 27 |
fn=predict,
|
| 28 |
+
inputs=[pdf_doc],
|
|
|
|
|
|
|
| 29 |
outputs="text",
|
| 30 |
description=description,
|
| 31 |
title=title,
|