Update app.py
Browse files
app.py
CHANGED
|
@@ -105,10 +105,16 @@ with gr.Blocks() as demo:
|
|
| 105 |
with gr.Column(scale=0.70):
|
| 106 |
txt = gr.Textbox(
|
| 107 |
show_label=False,
|
| 108 |
-
placeholder="Enter
|
| 109 |
)
|
| 110 |
|
| 111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
# iface = gr.Interface(
|
| 113 |
# fn=upload_pdf,
|
| 114 |
# inputs="file",
|
|
@@ -117,5 +123,5 @@ with gr.Blocks() as demo:
|
|
| 117 |
# description="Upload a PDF file and get its filename.",
|
| 118 |
# )
|
| 119 |
|
| 120 |
-
|
| 121 |
|
|
|
|
| 105 |
with gr.Column(scale=0.70):
|
| 106 |
txt = gr.Textbox(
|
| 107 |
show_label=False,
|
| 108 |
+
placeholder="Enter a question",
|
| 109 |
)
|
| 110 |
|
| 111 |
|
| 112 |
+
# Event handler for uploading a PDF
|
| 113 |
+
btn.upload(fn=upload_pdf, inputs="file", outputs="text")
|
| 114 |
+
|
| 115 |
+
demo.launch()
|
| 116 |
+
|
| 117 |
+
|
| 118 |
# iface = gr.Interface(
|
| 119 |
# fn=upload_pdf,
|
| 120 |
# inputs="file",
|
|
|
|
| 123 |
# description="Upload a PDF file and get its filename.",
|
| 124 |
# )
|
| 125 |
|
| 126 |
+
|
| 127 |
|