michaelj commited on
Commit
8b49d79
1 Parent(s): fc71933
Files changed (1) hide show
  1. main.py +4 -4
main.py CHANGED
@@ -13,10 +13,10 @@ app = FastAPI()
13
  def root():
14
  return {"API": "Sum of 2 Squares"}
15
 
16
- @app.post('/predict')
17
- async def predict_with_prompt(prompt: str):
18
 
19
-
20
- return "你好"+prompt
21
 
22
 
 
13
  def root():
14
  return {"API": "Sum of 2 Squares"}
15
 
16
+ @app.route('/predict', methods=['POST'])
17
+ def predict():
18
 
19
+ prompt = request.json.get('prompt')
20
+ return "你好啊"+prompt
21
 
22