CoolFace
Apppublic

mt5225/Sparrow

sourceHugging Faceupdated 4y agoView on Hugging Face
0likes
App README

Sparrow UI

Description

Sparrow UI module implements UI logic with Streamlit for document data annotation, model training/tuning and document data extraction.

Dashboard UI:

Sparrow Dashboard

Annotation UI:

Sparrow Annotation

Instructions

  1. 1.Install

Streamlit docs: https://docs.streamlit.io/library/get-started/installation

pip install -r requirements.txt
  1. 1.Run
streamlit run main.py

Run in Docker container

  1. 1.Build Docker image
docker build --tag katanaml/sparrow-ui .
  1. 1.Run Docker container
docker run -it --name sparrow-ui -p 7860:7860 katanaml/sparrow-ui:latest

Deploy to Hugging Face Spaces

  1. 1.Create new Space - https://huggingface.co/spaces
  1. 1.Clone Space repo and init Git LFS. Copy Sparrow UI files. We are using config.toml from config folder, when deploying Docker container on Hugging Face Spaces, it can't read from standard .streamlit folder
git lfs install
  1. 1.Add these files to LFS config
git lfs track "assets/ab.png"
git lfs track "docs/image/receipt_00001.png"
git lfs track "docs/image/receipt_00002.png"
git lfs track "docs/image/receipt_00003.png"
git lfs track "docs/image/w_invoice1.png"
  1. 1.Commit and push code to Hugging Face Space, follow Space instructions. Docker container will be deployed automatically. Space example:
https://huggingface.co/spaces/katanaml-org/sparrow-ui
  1. 1.Sparrow UI will be accessible by URL, you can get it from Hugging Face Space info. For example:
https://katanaml-org-sparrow-ui.hf.space

Author

Katana ML, Andrej Baranovskij

License

Licensed under the Apache License, Version 2.0. Copyright 2020-2022 Katana ML, Andrej Baranovskij. Copy of the license.