Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -86,7 +86,12 @@ def step():
|
|
86 |
|
87 |
agent_position = next_state
|
88 |
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
if __name__ == '__main__':
|
92 |
app.run(host='0.0.0.0', port=7860)
|
|
|
86 |
|
87 |
agent_position = next_state
|
88 |
|
89 |
+
# Convert NumPy arrays to lists to ensure JSON serializability
|
90 |
+
return jsonify({
|
91 |
+
'agent_position': list(agent_position),
|
92 |
+
'target': list(target),
|
93 |
+
'maze': maze.tolist()
|
94 |
+
})
|
95 |
|
96 |
if __name__ == '__main__':
|
97 |
app.run(host='0.0.0.0', port=7860)
|