Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -356,8 +356,8 @@ def summarize(inp,history,data=None,files=None,url=None,pdf_url=None,pdf_batch=N
|
|
356 |
json_out = compress_data(c,inp,out)
|
357 |
#json_box.append(json_out)
|
358 |
|
359 |
-
|
360 |
-
json_box.append(json_out)
|
361 |
print(f'JSON_BOX:: {json_box}')
|
362 |
# Writing to sample.json
|
363 |
#with open("tmp.json", "w") as outfile:
|
@@ -382,7 +382,7 @@ def summarize(inp,history,data=None,files=None,url=None,pdf_url=None,pdf_batch=N
|
|
382 |
#task = "complete?"
|
383 |
history.clear()
|
384 |
history.append((inp,rawp))
|
385 |
-
yield "", history,error_box,
|
386 |
|
387 |
#################################
|
388 |
def clear_fn():
|
@@ -412,7 +412,7 @@ with gr.Blocks() as app:
|
|
412 |
pdf_url = gr.Textbox(label="PDF URL")
|
413 |
with gr.Tab("PDF Batch"):
|
414 |
pdf_batch = gr.Textbox(label="PDF Batch (comma separated)")
|
415 |
-
json_out=gr.
|
416 |
e_box=gr.Textbox()
|
417 |
#text=gr.JSON()
|
418 |
#inp_query.change(search_models,inp_query,models_dd)
|
|
|
356 |
json_out = compress_data(c,inp,out)
|
357 |
#json_box.append(json_out)
|
358 |
|
359 |
+
json_object = json.dumps(json_out, indent=4)
|
360 |
+
#json_box.append(json_out)
|
361 |
print(f'JSON_BOX:: {json_box}')
|
362 |
# Writing to sample.json
|
363 |
#with open("tmp.json", "w") as outfile:
|
|
|
382 |
#task = "complete?"
|
383 |
history.clear()
|
384 |
history.append((inp,rawp))
|
385 |
+
yield "", history,error_box,json_out
|
386 |
|
387 |
#################################
|
388 |
def clear_fn():
|
|
|
412 |
pdf_url = gr.Textbox(label="PDF URL")
|
413 |
with gr.Tab("PDF Batch"):
|
414 |
pdf_batch = gr.Textbox(label="PDF Batch (comma separated)")
|
415 |
+
json_out=gr.JSON()
|
416 |
e_box=gr.Textbox()
|
417 |
#text=gr.JSON()
|
418 |
#inp_query.change(search_models,inp_query,models_dd)
|