Spaces:
Runtime error
Runtime error
test
Browse files12345675 unmodified lines131415161718192021# https://medium.com/@qacheampong/building-and-deploying-a-fastapi-app-with-hugging-face-9210e9b4a713# https://huggingface.co/spaces/Queensly/FastAPI_in_Dockerfrom fastapi import FastAPIimport uvicornapp = FastAPI()5 unmodified linesdef root():return {"API": "Sum of 2 Squares"}@app.route('/predict', methods=['POST'])def predict():prompt = request.json.get('prompt')return "你好啊"+prompt12345675 unmodified lines1314151617181920# https://medium.com/@qacheampong/building-and-deploying-a-fastapi-app-with-hugging-face-9210e9b4a713# https://huggingface.co/spaces/Queensly/FastAPI_in_Dockerfrom fastapi import FastAPI,Requestimport uvicornapp = FastAPI()5 unmodified linesdef root():return {"API": "Sum of 2 Squares"}@app.post("/predict")def predict(request: Request):prompt = request.json.get('prompt')return "你好啊"+prompt
main.py+3-4