Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -244,10 +244,15 @@ def save_memory(purpose, history):
|
|
244 |
|
245 |
try:
|
246 |
r = requests.get(f'{save_data}mem-test/main.json')
|
247 |
-
|
|
|
|
|
|
|
|
|
|
|
248 |
#out_lod.append(lod)
|
249 |
-
except Exception:
|
250 |
-
|
251 |
pass
|
252 |
lines = resp.strip().strip("\n").split("\n")
|
253 |
keyw_box=[]
|
|
|
244 |
|
245 |
try:
|
246 |
r = requests.get(f'{save_data}mem-test/main.json')
|
247 |
+
if r.status_code==200:
|
248 |
+
lod = json.loads(r.text)
|
249 |
+
lod = eval(lod)
|
250 |
+
print (lod)
|
251 |
+
else:
|
252 |
+
lod = []
|
253 |
#out_lod.append(lod)
|
254 |
+
except Exception as e:
|
255 |
+
print (e)
|
256 |
pass
|
257 |
lines = resp.strip().strip("\n").split("\n")
|
258 |
keyw_box=[]
|