Spaces:
Runtime error
Runtime error
Commit ·
a5bc826
1
Parent(s): 147a544
Update app.py
Browse files
app.py
CHANGED
|
@@ -290,16 +290,14 @@ with gr.Blocks() as demo:
|
|
| 290 |
inp1 = gr.File(label="Input PDF")
|
| 291 |
with gr.Column(scale=2):
|
| 292 |
outIndex1 = gr.File(label="Upload Previous Index Json", interactive=True)
|
| 293 |
-
# inp1 = gr.File(label="Input PDF")
|
| 294 |
with gr.Row():
|
| 295 |
with gr.Column(scale=4):
|
| 296 |
doSum1 = gr.Button("Summarise")
|
| 297 |
-
with gr.Column(scale=
|
| 298 |
chainType1 = gr.Radio(
|
| 299 |
["map_reduce", "stuff", "refine"], label="Chain_Type", value="map_reduce"
|
| 300 |
)
|
| 301 |
out1 = gr.Textbox(label="Summary")
|
| 302 |
-
# outIndex1 = gr.File(label="Upload Previous Index Json", interactive=True)
|
| 303 |
inp1.change(pdfv1, inputs=[inp1,chainType1], outputs=[out1, outIndex1])
|
| 304 |
doSum1.click(pdfv1, inputs=[inp1,chainType1], outputs=[out1, outIndex1])
|
| 305 |
outIndex1.change(storeIndex1, outIndex1)
|
|
@@ -311,11 +309,14 @@ with gr.Blocks() as demo:
|
|
| 311 |
# outputs=answer,
|
| 312 |
# fn = qa1,
|
| 313 |
# cache_examples=False,
|
| 314 |
-
)
|
| 315 |
-
radio1 = gr.Radio(
|
| 316 |
-
["default", "compact", "tree_summarize"], label="response_mode", value="default"
|
| 317 |
)
|
| 318 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 319 |
answer1 = gr.Textbox(label="Answer")
|
| 320 |
b1.click(qa1, inputs=[question1,radio1], outputs=answer1)
|
| 321 |
|
|
|
|
| 290 |
inp1 = gr.File(label="Input PDF")
|
| 291 |
with gr.Column(scale=2):
|
| 292 |
outIndex1 = gr.File(label="Upload Previous Index Json", interactive=True)
|
|
|
|
| 293 |
with gr.Row():
|
| 294 |
with gr.Column(scale=4):
|
| 295 |
doSum1 = gr.Button("Summarise")
|
| 296 |
+
with gr.Column(scale=2):
|
| 297 |
chainType1 = gr.Radio(
|
| 298 |
["map_reduce", "stuff", "refine"], label="Chain_Type", value="map_reduce"
|
| 299 |
)
|
| 300 |
out1 = gr.Textbox(label="Summary")
|
|
|
|
| 301 |
inp1.change(pdfv1, inputs=[inp1,chainType1], outputs=[out1, outIndex1])
|
| 302 |
doSum1.click(pdfv1, inputs=[inp1,chainType1], outputs=[out1, outIndex1])
|
| 303 |
outIndex1.change(storeIndex1, outIndex1)
|
|
|
|
| 309 |
# outputs=answer,
|
| 310 |
# fn = qa1,
|
| 311 |
# cache_examples=False,
|
|
|
|
|
|
|
|
|
|
| 312 |
)
|
| 313 |
+
with gr.Row():
|
| 314 |
+
with gr.Column(scale=4):
|
| 315 |
+
b1 = gr.Button("Query")
|
| 316 |
+
with gr.Column(scale=2):
|
| 317 |
+
radio1 = gr.Radio(
|
| 318 |
+
["default", "compact", "tree_summarize"], label="response_mode", value="default"
|
| 319 |
+
)
|
| 320 |
answer1 = gr.Textbox(label="Answer")
|
| 321 |
b1.click(qa1, inputs=[question1,radio1], outputs=answer1)
|
| 322 |
|