Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -449,8 +449,7 @@ with gr.Blocks(title='Flan-SDE Behavioral Profiler') as demo:
|
|
| 449 |
try:
|
| 450 |
# get last log entry by reading file
|
| 451 |
with open(LOG_PATH, 'r', encoding='utf-8') as f:
|
| 452 |
-
lines = f.read().strip().split('
|
| 453 |
-
')
|
| 454 |
last = json.loads(lines[-1]) if lines else None
|
| 455 |
modes = last.get('modes') if last else []
|
| 456 |
fig = plot_paths(np.array(modes[0]['paths']) if 'paths' in modes[0] else np.zeros((1,5,2)))
|
|
|
|
| 449 |
try:
|
| 450 |
# get last log entry by reading file
|
| 451 |
with open(LOG_PATH, 'r', encoding='utf-8') as f:
|
| 452 |
+
lines = f.read().strip().split('')
|
|
|
|
| 453 |
last = json.loads(lines[-1]) if lines else None
|
| 454 |
modes = last.get('modes') if last else []
|
| 455 |
fig = plot_paths(np.array(modes[0]['paths']) if 'paths' in modes[0] else np.zeros((1,5,2)))
|