Downloads · 30 days
4
3% of all-time downloads
JackVines/ds_saliency_inference
ds_saliency_inference is a machine learning model from JackVines. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for tf-keras.
This is an API and Streamlit app to interact with a saliency model. The API is built using FastAPI and the Streamlit app is built using Streamlit. The API is built to be run in a Docker container.
Downloads · 30 days
4
3% of all-time downloads
All-time downloads
124
Public
Repo size
99.9 MB
Likes
0
Public
Click a slice to open those files.
.pb200 MB · 100%
From the Hugging Face model README
This is an API and Streamlit app to interact with a saliency model. The API is built using FastAPI and the Streamlit app is built using Streamlit. The API is built to be run in a Docker container.
pip install -r requirements.txt
uvicorn main:app --reload --workers 1 --host 0.0.0.0 --port 8080
This will run the FastAPI server on port 8080.
docker build -t ds-api-template .
docker run -p 8080:8080 ds-api-template
You can test this is running by executing the same curl command as above, which should return the same response.
NOTE: You will need to have Docker installed on your machine. To install Docker, follow the instructions here.
Once you've set up the API, you can run the Streamlit app to interact with the API.
To run the Streamlit app, run the following command:
streamlit run app.py
You will need to have Streamlit installed on your machine. To install Streamlit, run the following command:
pip install streamlit
You will also need to update a secrets.toml file in a .streamlit directory at the root of the repo. This file should contain the following:
api_host = "http://localhost:8080"
password = "<INSERT DESIRED PASSWORD HERE>"