Skip to content

Commit

Permalink
Update fedml_inference_runner.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael-Jin authored Oct 24, 2023
1 parent 944f067 commit d413ef0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/fedml/serving/fedml_inference_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ async def predict(request: Request):
input_json = await request.json()
response_text = self.client_predictor.predict(input_json)

return str(response_text)
return {"generated_text": str(response_text)}

@api.get("/ready")
async def ready():
return {"status": "Success"}

import uvicorn
port = 2345
uvicorn.run(api, host="0.0.0.0", port=port)
uvicorn.run(api, host="0.0.0.0", port=port)

0 comments on commit d413ef0

Please sign in to comment.