Hello everyone,
I’ve deployed a FastAPI application on Hugging Face Spaces. Everything seems to be running smoothly, and there are no errors in the logs. However, when I try to access my endpoints via a browser or tools like Postman, I’m getting a “404 error” or a “Cannot POST” error.
Here’s a brief overview of my setup:
- I have a FastAPI route defined as
@app.get("/check_request")
and another one as@app.post("/recommend")
. - My Dockerfile specifies the CMD as
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
.
When I try to access the endpoint https://huggingface.co/spaces/DjPapzin/Emo_Play/check_request
in my browser, I get a “404 error”. Similarly, when I use Postman to send a POST request to https://huggingface.co/spaces/DjPapzin/Emo_Play/recommend
, I receive a “Cannot POST” error.
Has anyone encountered a similar issue or have any insights on what might be going wrong? Any help or guidance would be greatly appreciated!