Help with api on spaces
Hi, I’ve created a simple app, its a docker file with a fastAPI api. There are 2 endpoints.  GET (“/”)   and POST (“/inference”). After the building process, I can see the Hello Work working ok on the browser.  But im enable to reach it from curl.  The app is served at 5000 port.  If i do it like this:curl -X GET --location ‘https://huggingface.co/spaces/my_user/myspace’ --header ‘Content-Type: application/json’ --header ‘Authorization: Bearer <MY_HG_TOKEN>’I get the htmlIf i do it like thiscurl -X GET --location ‘https://huggingface.co/spaces/my_user/myspace:5000’ --header ‘Content-Type: application/json’ --header ‘Authorization: Bearer <MY_HG_TOKEN>’I get {“error”:“Invalid username or password.”}:I added the app_port to the READMEAny ideas what Im missing ?
2024-10-04T21:21:08Z
The only thing I can think of is to use this URL instead, which seems to be an alias or main body of Spaces.https://my_user-myspace.hf.space/
2024-10-07T17:05:50Z
John6666:https://my_user-myspace.hf.space/Thanks for the answer Jhon goona give it a try-
2024-10-08T11:03:50Z
Yeap, using that url works like a charm. Thanks again.
2024-10-08T11:13:39Z
I didn’t think it would work out that well. Well, thank goodness.