Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -424,12 +424,22 @@ Required keys:
|
|
424 |
|
425 |
def format_json(inp):
|
426 |
print("FORMATTING:::")
|
427 |
-
|
|
|
428 |
print(inp)
|
429 |
-
|
430 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|