Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -185,16 +185,17 @@ with gr.Blocks() as demo:
|
|
185 |
gr.Markdown("# PDF Uploader to Pinecone with Query Response")
|
186 |
|
187 |
with gr.Column():
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
|
193 |
-
query_input = gr.Textbox(label="Enter your query:")
|
194 |
-
query_button = gr.Button("Get Response")
|
195 |
-
response_output = gr.Textbox(label="Response:")
|
196 |
-
|
197 |
-
process_button.click(fn=process_pdf, inputs=[file_input, gr.State([])], outputs=[document_table, output_textbox])
|
198 |
-
query_button.click(fn=run_graph, inputs=query_input, outputs=response_output)
|
199 |
|
200 |
demo.launch(show_error=True)
|
|
|
185 |
gr.Markdown("# PDF Uploader to Pinecone with Query Response")
|
186 |
|
187 |
with gr.Column():
|
188 |
+
with gr.Row():
|
189 |
+
response_output = gr.Textbox(label="Response:", lines=10, max_lines=10)
|
190 |
+
query_input = gr.Textbox(label="Enter your query:")
|
191 |
+
query_button = gr.Button("Get Response")
|
192 |
+
query_button.click(fn=run_graph, inputs=query_input, outputs=response_output)
|
193 |
+
with gr.Row():
|
194 |
+
file_input = gr.File(label="Upload PDF", file_types=[".pdf"])
|
195 |
+
document_table = gr.Dataframe(headers=["Document Name", "Upload Time", "Chunks", "Pinecone Index"], interactive=False)
|
196 |
+
output_textbox = gr.Textbox(label="Result")
|
197 |
+
process_button = gr.Button("Process PDF and Upload")
|
198 |
+
process_button.click(fn=process_pdf, inputs=[file_input, gr.State([])], outputs=[document_table, output_textbox])
|
199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
|
201 |
demo.launch(show_error=True)
|