Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -300,8 +300,8 @@ def create_app():
|
|
| 300 |
# Reinitialize the agent_app with the new database file
|
| 301 |
global abs_file_path
|
| 302 |
abs_file_path = os.path.abspath(db_path)
|
| 303 |
-
|
| 304 |
-
|
| 305 |
|
| 306 |
print(f"[INFO_PRINT]: Database file '{file.filename}' uploaded and loaded.")
|
| 307 |
socketio.emit("log", {"message": f"[INFO]: Database file '{file.filename}' uploaded and loaded."})
|
|
|
|
| 300 |
# Reinitialize the agent_app with the new database file
|
| 301 |
global abs_file_path
|
| 302 |
abs_file_path = os.path.abspath(db_path)
|
| 303 |
+
global agent_app
|
| 304 |
+
agent_app = create_agent_app(abs_file_path)
|
| 305 |
|
| 306 |
print(f"[INFO_PRINT]: Database file '{file.filename}' uploaded and loaded.")
|
| 307 |
socketio.emit("log", {"message": f"[INFO]: Database file '{file.filename}' uploaded and loaded."})
|