MahmoudNasser commited on
Commit
2808cb2
1 Parent(s): 9d4bfa4

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -1
main.py CHANGED
@@ -155,7 +155,11 @@ def modelpredict(data):
155
  # Main Server inilization
156
  app = FastAPI()
157
 
158
- @app.post("/")
 
 
 
 
159
  async def read_root(request: Request):
160
  json_data = await request.json()
161
  if "mathod" in json_data and json_data["mathod"] == "emotion_predict" and 'text' in json_data:
 
155
  # Main Server inilization
156
  app = FastAPI()
157
 
158
+ @app.get("/")
159
+ def index():
160
+ return "Hello World"
161
+
162
+ @app.post("/predict")
163
  async def read_root(request: Request):
164
  json_data = await request.json()
165
  if "mathod" in json_data and json_data["mathod"] == "emotion_predict" and 'text' in json_data: