Streamlit component that allows you to annotate PDFs easily, built with Vue3 and Vite.
Ensure you have Python 3.6+, Node.js and npm installed.
- Clone this repository:
git clone git@github.com:gabrieltempass/streamlit-component-vue-vite-template.git
- Go to the
frontend
directory and initialize and run the component template frontend:
cd streamlit-component-vue-vite-template/annotator/frontend
npm install
npm run dev
- From a separate terminal, go to the repository root directory, create a new Python virtual environment, activate it and install Streamlit and the template as an editable package:
cd streamlit-component-vue-vite-template
python3 -m venv venv
. venv/bin/activate
pip install streamlit
pip install -e .
Still from the same separate terminal, run the example Streamlit app:
streamlit run annotator/example.py
If all goes well, you should see something like this:
Modify the frontend code at annotator/frontend/src/MyComponent.vue
.
Modify the Python code at annotator/__init__.py
.