Spaces:
Running
Running
TahaFawzyElshrif commited on
Commit ·
03566bf
1
Parent(s): 46ad448
debug
Browse files- Dockerfile +1 -2
- app.py +6 -0
Dockerfile
CHANGED
|
@@ -15,5 +15,4 @@ COPY . .
|
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
-
|
| 19 |
-
CMD ["python", "-u", "app.py","&","python", "-u", "Consumer.py" ,"&","wait"]
|
|
|
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
+
CMD ["python", "-u", "app.py"]
|
|
|
app.py
CHANGED
|
@@ -7,6 +7,12 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '.
|
|
| 7 |
from Server import get_response
|
| 8 |
from pydantic import BaseModel
|
| 9 |
from agent.agent_graph.StateTasks import ProblemState
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Create app instance
|
| 12 |
app = FastAPI()
|
|
|
|
| 7 |
from Server import get_response
|
| 8 |
from pydantic import BaseModel
|
| 9 |
from agent.agent_graph.StateTasks import ProblemState
|
| 10 |
+
import subprocess
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
# Start consumer in a separate process
|
| 14 |
+
subprocess.Popen(['python','-u','Consumer.py'])
|
| 15 |
+
|
| 16 |
|
| 17 |
# Create app instance
|
| 18 |
app = FastAPI()
|