A Python implementation of the "SeeFood" app from HBO's Silicon Valley series. This app classifies images as either "Hotdog" or "Not Hotdog" using Ollama for inference.
This project was create using Cursor AI
- Python 3.11+
- Poetry for dependency management
- Ollama runningwith llama3.2-vision model
- Install dependencies:
poetry install- Set up environment variables:
Create a
.envfile with:
OLLAMA_BASE_URL=http://localhost:11434
- Run the application:
Start the Streamlit UI:
poetry run python run_ui.pyor
poetry run streamlit run app/main.pyOptionally, start the FastAPI server:
poetry run python run_api.pyor
poetry run uvicorn app.main:app --reloadThe api isn't used by the app. The docs can be viewed at http://localhost:8000/docs.
app/main.py: Main FastAPI and Streamit applicationapp/models/hotdog_classifier.py: Image classification modelapp/utils/image_utils.py: Image processing utilitiesapp/tests/: Test filesimages: Some sample images for testing