michaelj commited on
Commit
0950a65
1 Parent(s): 22c4eb1
Files changed (1) hide show
  1. main.py +4 -3
main.py CHANGED
@@ -14,8 +14,9 @@ def root():
14
  return {"API": "Sum of 2 Squares"}
15
 
16
  @app.post("/predict")
17
- def predict(request: Request):
18
- prompt = request.json.get('prompt')
19
- return "你好啊"+prompt
 
20
 
21
 
 
14
  return {"API": "Sum of 2 Squares"}
15
 
16
  @app.post("/predict")
17
+ async def predict(request: Request):
18
+ data = await request.json()
19
+ prompt = data.get("prompt")
20
+ return f"您好,{prompt}"
21
 
22