Spaces:
Sleeping
Sleeping
Update api_server.py
Browse files- api_server.py +8 -0
api_server.py
CHANGED
|
@@ -176,3 +176,11 @@ def read_root():
|
|
| 176 |
</html>
|
| 177 |
"""
|
| 178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
</html>
|
| 177 |
"""
|
| 178 |
|
| 179 |
+
import threading
|
| 180 |
+
|
| 181 |
+
def run_agent():
|
| 182 |
+
import app
|
| 183 |
+
app.main()
|
| 184 |
+
|
| 185 |
+
# Ejecuta el agente en un hilo aparte al arrancar el servidor
|
| 186 |
+
threading.Thread(target=run_agent, daemon=True).start()
|