Omnibus commited on
Commit
0bb0248
1 Parent(s): 173ab3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -353,8 +353,17 @@ def summarize(inp,history,data=None,files=None,url=None,pdf_url=None,pdf_batch=N
353
  c +=1
354
  print (f'c:: {c}')
355
 
356
- json_out = compress_data(c,inp,out)
357
- json_box.append(json_out)
 
 
 
 
 
 
 
 
 
358
  out = str(json_out)
359
  rl = len(out)
360
  print(f'rl:: {rl}')
@@ -372,7 +381,7 @@ def summarize(inp,history,data=None,files=None,url=None,pdf_url=None,pdf_batch=N
372
  #task = "complete?"
373
  history.clear()
374
  history.append((inp,rawp))
375
- yield "", history,error_box,json_box
376
 
377
  #################################
378
  def clear_fn():
 
353
  c +=1
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
+ outfile.write(json_object)
364
+ outfile.close()
365
+
366
+ #json_box.append(json_out)
367
  out = str(json_out)
368
  rl = len(out)
369
  print(f'rl:: {rl}')
 
381
  #task = "complete?"
382
  history.clear()
383
  history.append((inp,rawp))
384
+ yield "", history,error_box,"tmp.json"
385
 
386
  #################################
387
  def clear_fn():