Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -248,11 +248,12 @@ def save_memory(purpose, history):
|
|
248 |
if r.status_code==200:
|
249 |
|
250 |
lod = json.loads(r.text)
|
251 |
-
lod = eval(lod)
|
252 |
print (f'lod:: {lod}')
|
253 |
else:
|
254 |
lod = []
|
255 |
for i,line in enumerate(lines):
|
|
|
256 |
if ":" in line:
|
257 |
print(f'line:: {line}')
|
258 |
|
@@ -263,7 +264,7 @@ def save_memory(purpose, history):
|
|
263 |
print (keyw.split("[")[1].split("]")[0])
|
264 |
keyw=keyw.split("[")[1].split("]")[0]
|
265 |
print(keyw)
|
266 |
-
lod.append({"file_name":timename,"keywords":
|
267 |
with open(f"tmp2-{uid}.json", "w") as outfile2:
|
268 |
outfile2.write(str(lod))
|
269 |
api.upload_file(
|
|
|
248 |
if r.status_code==200:
|
249 |
|
250 |
lod = json.loads(r.text)
|
251 |
+
#lod = eval(lod)
|
252 |
print (f'lod:: {lod}')
|
253 |
else:
|
254 |
lod = []
|
255 |
for i,line in enumerate(lines):
|
256 |
+
print(f'LINE:: {line}')
|
257 |
if ":" in line:
|
258 |
print(f'line:: {line}')
|
259 |
|
|
|
264 |
print (keyw.split("[")[1].split("]")[0])
|
265 |
keyw=keyw.split("[")[1].split("]")[0]
|
266 |
print(keyw)
|
267 |
+
lod.append({"file_name":timename,"keywords":str(keyw)})
|
268 |
with open(f"tmp2-{uid}.json", "w") as outfile2:
|
269 |
outfile2.write(str(lod))
|
270 |
api.upload_file(
|