Spaces:
Running
Running
test
Browse files
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 |
-
|
19 |
-
|
|
|
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 |
|