Hello, I am trying to use my existing fastapi code, but scale it with RayServe. This is the code snippet:
from fastapi import UploadFile, FastAPI
from ray import serve
app = FastAPI()
@serve.deployment()
@serve.ingress(app)
class MyFastAPIDeployment:
@app.post("/segment_text")
async def segment_text(text: UploadFile):
text = await text.read()
This code in FastApi worked fine, but with RayServe I am getting an error 'MyFastAPIDeployment' object has no attribute 'read'
Can you please advice me on how to send files and read them?