Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -136,8 +136,8 @@ def parse_json(inp):
|
|
| 136 |
if type(inp)==type(""):
|
| 137 |
lines=""
|
| 138 |
if "```" in inp:
|
| 139 |
-
start =
|
| 140 |
-
end =
|
| 141 |
if start >= 0 and end >= 0:
|
| 142 |
json1= string[start:end] # Slice the string between start and end
|
| 143 |
else:
|
|
|
|
| 136 |
if type(inp)==type(""):
|
| 137 |
lines=""
|
| 138 |
if "```" in inp:
|
| 139 |
+
start = inp.find("```json") + 1 # Find index after the start character
|
| 140 |
+
end = inp.find("```", start) # Find index of end character from the start index
|
| 141 |
if start >= 0 and end >= 0:
|
| 142 |
json1= string[start:end] # Slice the string between start and end
|
| 143 |
else:
|