Colab notebook¶
Two notebooks contain the complete workshop, one per language. They run on the free Colab tier.
| Notebook | Open |
|---|---|
| English | |
| Türkçe |
What the notebook does¶
- Setup: clones the repository and installs
sentence-transformers,litert-lm-apiand the app (Colab already has PyTorch). - Hello embeddings: task prompts and Turkish ↔ English similarity.
- Build the index: places, DevFest facts, EmbeddingGemma notes and photos.
- Search: text search and text → photo search, shown with the images inline.
- Measure: recall at 768, 512, 256 and 128 dimensions.
- Router: zero-shot intent classification.
- LiteRT: the same queries through the 165 MB on-device model, compared with PyTorch.
- Web app: starts the FastAPI server inside Colab and prints a link to the UI.
Tips for the free tier¶
- Runtime → Change runtime type → T4 GPU speeds up photo indexing. The notebook falls back to CPU automatically.
- If Colab disconnects, run Runtime → Run all again. The models are cached for the session.
- The web app link only works while the notebook is running.
Running it locally¶
The notebooks also run in Jupyter or VS Code on your own machine: