Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -131,6 +131,8 @@ def generate(prompt,history,mod=2,tok=4000,seed=1,role="ASSISTANT",data=None):
|
|
| 131 |
print('Done: ',output)
|
| 132 |
return [{'role':'assistant','content': {'path':output}}]'''
|
| 133 |
def parse_json(inp):
|
|
|
|
|
|
|
| 134 |
if type(inp)==type(""):
|
| 135 |
lines=""
|
| 136 |
if "```" in inp:
|
|
@@ -146,7 +148,7 @@ def parse_json(inp):
|
|
| 146 |
tog = True
|
| 147 |
elif cnt==2:
|
| 148 |
tog = False
|
| 149 |
-
|
| 150 |
print(lines)
|
| 151 |
out_json=eval(lines)
|
| 152 |
try:
|
|
|
|
| 131 |
print('Done: ',output)
|
| 132 |
return [{'role':'assistant','content': {'path':output}}]'''
|
| 133 |
def parse_json(inp):
|
| 134 |
+
print("PARSE INPUT")
|
| 135 |
+
print(inp)
|
| 136 |
if type(inp)==type(""):
|
| 137 |
lines=""
|
| 138 |
if "```" in inp:
|
|
|
|
| 148 |
tog = True
|
| 149 |
elif cnt==2:
|
| 150 |
tog = False
|
| 151 |
+
print("Extracted Lines")
|
| 152 |
print(lines)
|
| 153 |
out_json=eval(lines)
|
| 154 |
try:
|