Skip to content

Haizhuolaojisite/Style-Transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Style-Transfer

Serving a Machine Learning Model with FastAPI and Streamlit

Download Models

Use the package manager pip to install fast-style transfer models.

sh download_models.sh

Usage

From the "backend" folder in terminal, build the image

docker build -t backend .

Run the container:

$ docker run -p 8080:8080 backend

INFO:     Started server process [1]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)

In the browser, navigate to http://localhost:8080/. You should see:

{
  "message": "Welcome from the API"
}

kill the container once done

To test, from the project root, build the images and spin up both containers, then navigate to http://localhost:8501

$ docker-compose up -d --build

Image of styletransfer

Reference

https://testdriven.io/blog/fastapi-streamlit/

About

Serving a Machine Learning Model with FastAPI and Streamlit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published