Omnibus commited on
Commit
f483027
1 Parent(s): 86e6e54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -424,12 +424,22 @@ Required keys:
424
 
425
  def format_json(inp):
426
  print("FORMATTING:::")
427
- inp=str(inp).replace("\n","")
 
428
  print(inp)
429
- out_json = inp.split("{")[1].split("}",-1)[0]
430
- out_json={out_json}
 
 
 
 
 
 
 
 
 
431
  print(out_json)
432
- return out_json
433
 
434
 
435
 
 
424
 
425
  def format_json(inp):
426
  print("FORMATTING:::")
427
+ print(type(inp))
428
+ print("###########")
429
  print(inp)
430
+ print("###########")
431
+ print("###########")
432
+ new_str=""
433
+ for i,line in enumerate(inp):
434
+ line = line.strip()
435
+ print(line)
436
+ new_str+=line.strip("\n")
437
+ print("###########")
438
+ print("###########")
439
+
440
+ out_json = new_str.split("{")[1].split("}",-1)[0]
441
  print(out_json)
442
+ return {out_json}
443
 
444
 
445