A minimal, recruiter-friendly Streamlit app that simulates a job interview using the OpenAI API.
It guides the user through a brief setup, runs a short interview with streamed model responses, supports an immediate Stop control (button or ESC), and then generates structured feedback.
- Guided setup: Candidate details + target role/company.
- Interview chat: OpenAI Chat Completions with streaming output.
- Stop control: Button on the UI + ESC key to halt generation mid-stream.
- Early-stop rule: If stopped before any user message, feedback will not be offered (by design).
- Post-interview feedback: Score (1–10) + concise feedback using a fixed format.
-
Clone the repository and move into it.
-
Create and activate a Python 3.10+ environment.
-
Set your OpenAI key.
Windows (PowerShell):
setx OPENAI_API_KEY "sk-your-key"macOS/Linux (bash/zsh):
export OPENAI_API_KEY="sk-your-key"
-
Install dependencies:
pip install -r requirements.txt
-
Run the app:
python -m streamlit run app.py
The app reads
OPENAI_API_KEYfrom env vars locally. In Streamlit Cloud, set it under Advanced settings → Secrets.
- Push this repo to public GitHub (required by Community Cloud).
- Go to share.streamlit.io → New app.
- Select your repo, branch (
main), and file path (app.py). - Under Advanced settings → Secrets, add your OpenAI key in TOML format:
OPENAI_API_KEY = "sk-your-key"
- Deploy. The app will build and provide a shareable URL.
The app is deployed on Streamlit Community Cloud and available here:
👉 Streamlit Interview Simulator
Setup Screen
Candidate provides personal details, experience, skills, and selects target role/company.
Interview in Action
The candidate introduces themselves, the interviewer responds with a contextual question,
and the red Stop button is visible for early-stop control.
- The flow is: Setup → Interview → Stop/Complete → Feedback.
- Stop:
- Click Stop (top-right) or press ESC to halt generation.
- If Stop is pressed before the first user message, the interview ends and no Feedback option appears.
- If Stop is pressed mid-answer, streaming stops and the session is marked complete.
- Limits: The interview accepts up to 5 user messages in total.
- Local: environment variable
OPENAI_API_KEY. - Streamlit Cloud: set
OPENAI_API_KEYunder Advanced settings → Secrets. - The app fails fast with a clear error if the key is missing.
- Frontend: Streamlit
- LLM: OpenAI Chat Completions API
- Language: Python 3.10+
- State:
st.session_state(single-file prototype)
streamlit-interview-simulator/
├─ .github/
│ └─ workflows/
│ └─ ci.yml # GitHub Actions workflow (CI)
├─ .idea/ # IDE config (PyCharm)
├─ assets/
│ ├─ demo_conversation.png # 1378×1003 conversation view (README demo)
│ ├─ demo_setup.png # 877×1134 setup view (README demo)
│ └─ interview_social.png # 1280×640 conversation view (GitHub/LinkedIn social preview)
├─ tests/ # Smoke tests
│ └─ test_import.py
├─ .gitignore # Keeps secrets & caches out of version control
├─ LICENSE # MIT license
├─ README.md # Project documentation
├─ app.py # Streamlit app (main entrypoint)
└─ requirements.txt # Minimal, pinned dependencies
Minimal set for fast builds:
streamlit>=1.37
openai>=1.42
streamlit-js-eval>=0.1.7Add only what you actually import. Keeping this minimal improves reliability and cold-start time.
- This is a lightweight prototype (no database, no authentication).
- Feedback is model-generated and non-deterministic.
- If you add embeddings, RAG, or vector search later, update
requirements.txtaccordingly and document the changes.
Acknowledgments
Originally developed during The AI Engineer Course 2025 (Udemy).
Now actively maintained as a public, open-source project.
MIT — see LICENSE

