Spaces:
Running
Running
TahaFawzyElshrif commited on
Commit ·
225286f
1
Parent(s): 5410b93
modified processing to use queue
Browse files
app.py
CHANGED
|
@@ -6,7 +6,6 @@ import sys
|
|
| 6 |
import os
|
| 7 |
import json
|
| 8 |
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
| 9 |
-
from Server import get_response
|
| 10 |
from pydantic import BaseModel
|
| 11 |
from agent.agent_graph.StateTasks import ProblemState
|
| 12 |
import subprocess
|
|
@@ -68,15 +67,10 @@ def old_call(request: RequestModel):
|
|
| 68 |
|
| 69 |
@app.post("/call/")
|
| 70 |
def call(request: RequestModel):
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
except Exception:
|
| 74 |
-
state: ProblemState = {
|
| 75 |
-
"question": request.prompt,
|
| 76 |
-
"memory": request.memory
|
| 77 |
-
}
|
| 78 |
|
| 79 |
-
return send_message(
|
| 80 |
|
| 81 |
if __name__ == "__main__":
|
| 82 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
|
| 6 |
import os
|
| 7 |
import json
|
| 8 |
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
|
|
|
| 9 |
from pydantic import BaseModel
|
| 10 |
from agent.agent_graph.StateTasks import ProblemState
|
| 11 |
import subprocess
|
|
|
|
| 67 |
|
| 68 |
@app.post("/call/")
|
| 69 |
def call(request: RequestModel):
|
| 70 |
+
|
| 71 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
+
return send_message(request.model_dump())
|
| 74 |
|
| 75 |
if __name__ == "__main__":
|
| 76 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|