Creditondairy/trainer
0
title: Factory Voice Trainer emoji: π§ colorFrom: indigo colorTo: blue sdk: streamlit sdkversion: "1.39.0" appfile: app.py pinned: false ---
Factory Voice Trainer (External Version - Starter)
This is a minimal Streamlit app that lets operators chat with a Factory Machine Voice Trainer. It supports:
- Uploading SOPs (PDF/TXT)
- Context-grounded guidance (starter keyword retriever)
- Optional voice replies via OpenAI TTS
For production, swap the simple retriever for embeddings (OpenAI + Chroma/FAISS) and add microphone input (ASR) with streamlit-webrtc + Whisper.π§ Local Run
1) Python 3.10+ recommended. 2) Install deps:
pip install -r requirements.txt3) Create .env with your OpenAI key:
OPENAI_API_KEY=sk-...4) Run:
streamlit run app.pyβοΈ Deploy (Hugging Face Spaces - no GitHub required)
1) Create a new Space (type: Streamlit). 2) Upload these files: app.py, requirements.txt, README.md. 3) In Settings β Secrets, add your key:
OPENAI_API_KEY=sk-...4) The app builds and provides a public URL.
πΊοΈ Roadmap
- Replace keyword retriever with embeddings (OpenAI
text-embedding-3-large) + vector DB. - Add ASR (live microphone) with
streamlit-webrtc+ Whisper. - Add operator profiles + progress logging (Firestore/SQL).
- Build step engine for Start-up / CIP / Shutdown with checkpoints.
