Sign inSign up

alyetama/remove-background

By alyetama

•Updated over 4 years ago

Web app to remove image background

Image
0

291

alyetama/remove-background repository overview

⁠Rembg App

Web app to remove images background using rembg⁠ (Demo⁠).

Docker Build pages-build-deployment Docker Hub Supported Python versions Streamlit PEP8

⁠Deployment

git clone https://github.com/Alyetama/Rembg-App.git
cd Rembg-App
⁠Option 1: Run locally
pip install -r requirements.txt
streamlit run streamlit_app.py
⁠Option 2: Free cloud hosting on Streamlit Cloud

streamlit_cloud

⁠Option 3: Docker
docker run \
    -p 8501:8501 \
    -v "${PWD}/.streamlit:/home/app/.streamlit" \
    alyetama/rembg-app:latest
⁠Docker Compose
docker-compose up -d
⁠Updating
docker pull alyetama/rembg-app:latest

If you're using the pre-built docker image in docker-compose, you can update the image by running:

docker-compose down
docker-compose pull
docker-compose up -d

⁠Configuration

  • To configure the streamlit application, edit .streamlit/config.toml (configuration reference⁠).
  • To configure the maximum number of uploaded files (default: 10), set the environment variable MAX_FILES:
    • Option 1: Export the variable.
    export MAX_FILES=20
    
    • Option 2: Edit the value of MAX_FILES in .env.
    mv .env.example .env
    nano .env  # or any other text editor
    
    • On Streamlit Cloud: Go to the app settings -> Secrets -> MAX_FILES = 20 -> save.

⁠Notes

  • The very first processed image after starting the app may take few minutes, because the backend model is being downloaded for the first time.

Tag summary

Content type

Image

Digest

Size

563.6 MB

Last updated

over 4 years ago

docker pull alyetama/remove-background