Abhlash commited on
Commit
c74350c
·
verified ·
1 Parent(s): 0297150

Update MathEngine.py

Browse files
Files changed (1) hide show
  1. MathEngine.py +1 -7
MathEngine.py CHANGED
@@ -1,7 +1,5 @@
1
  from fastapi import FastAPI, HTTPException
2
  from pydantic import BaseModel
3
- import uvicorn
4
- from app import app
5
 
6
  app = FastAPI()
7
 
@@ -29,8 +27,4 @@ def calculate(request: CalculationRequest):
29
  else:
30
  raise HTTPException(status_code=400, detail="Invalid operation")
31
 
32
- return {"result": result}
33
-
34
- if __name__ == "__main__":
35
- uvicorn.run(app, host="0.0.0.0", port=8000)
36
- # To run the application, use the command: uvicorn app.main:app --reload
 
1
  from fastapi import FastAPI, HTTPException
2
  from pydantic import BaseModel
 
 
3
 
4
  app = FastAPI()
5
 
 
27
  else:
28
  raise HTTPException(status_code=400, detail="Invalid operation")
29
 
30
+ return {"result": result}