topshelf-poc / README.md
Dan Biagini
pretty up README
ca8be5b
---
title: Top Shelf
emoji: πŸš€
colorFrom: blue
colorTo: indigo
sdk: streamlit
sdk_version: 1.38.0
app_file: src/app.py
pinned: false
---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
## Dev install virtual environment -- python 3.11.5
```python -m venv .venv```
```source .venv/bin/activate```
## Update requirements.txt
There are two requirements.txt files, the requirements-cpu.txt can be used for smaller installations but will only use CPU based
pytorch computations.
Keeping them in sync is important, *to do so on a CPU installed dev system* do the following:
1. Freeze requirements (get currently installed versions): ```pip freeze > requirements-cpu.txt```
1. Create a diff file with the changes needed to update requirements.txt: ```diff requirements-cpu.txt requirements.txt > req-patch.diff```
1. Edit the req-patch.diff to remove the torch* related diffs (the requirements.txt torch entries should not have +cpu)
1. Patch the requirements.txt file: ```patch -R requirements.txt req-patch.diff```
## Manual Testing
To run in google cloud shell:
```streamlit run src/app.py --browser.serverAddress 8501-$WEB_HOST --browser.serverPort 80```