Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -354,14 +354,14 @@ def summarize(inp,history,data=None,files=None,url=None,pdf_url=None,pdf_batch=N
|
|
354 |
print (f'c:: {c}')
|
355 |
|
356 |
json_out = compress_data(c,inp,out)
|
357 |
-
|
358 |
|
359 |
json_object = json.dumps(json_out, indent=4)
|
360 |
-
|
361 |
# Writing to sample.json
|
362 |
-
with open("tmp.json", "w") as outfile:
|
363 |
-
|
364 |
-
outfile.close()
|
365 |
|
366 |
#json_box.append(json_out)
|
367 |
out = str(json_out)
|
@@ -381,7 +381,7 @@ def summarize(inp,history,data=None,files=None,url=None,pdf_url=None,pdf_batch=N
|
|
381 |
#task = "complete?"
|
382 |
history.clear()
|
383 |
history.append((inp,rawp))
|
384 |
-
yield "", history,error_box,
|
385 |
|
386 |
#################################
|
387 |
def clear_fn():
|
|
|
354 |
print (f'c:: {c}')
|
355 |
|
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_object)
|
361 |
# Writing to sample.json
|
362 |
+
#with open("tmp.json", "w") as outfile:
|
363 |
+
# outfile.write(json_object)
|
364 |
+
#outfile.close()
|
365 |
|
366 |
#json_box.append(json_out)
|
367 |
out = str(json_out)
|
|
|
381 |
#task = "complete?"
|
382 |
history.clear()
|
383 |
history.append((inp,rawp))
|
384 |
+
yield "", history,error_box,json_box
|
385 |
|
386 |
#################################
|
387 |
def clear_fn():
|