A Streamlit app that simulates a job interview with an AI HR interviewer. You enter your background, pick a role and company, answer up to five questions in a live chat, then receive a scored performance review.
The app runs in three stages:
- Setup — Enter your name, experience, and skills. Choose interview level (Junior / Mid-level / Senior), position (e.g. Data Scientist, ML Engineer), and company (Amazon, Meta, Spotify, etc.).
- Interview — GPT-4o acts as an HR executive and conducts a short mock interview based on your profile. You can send up to 5 messages (intro + follow-up answers). Responses stream in real time.
- Feedback — After the interview, click Get Feedback to receive a score (1–10) and written feedback on your performance. Use Restart Interview to start over.
- Python 3.10+ (tested with 3.13)
- An OpenAI API key with billing enabled (platform.openai.com)
- Internet access (calls OpenAI API)
streamlitapp/
├── app.py # Main Streamlit application
├── requirements.txt # Python dependencies
├── .streamlit/
│ └── secrets.toml # API key (not committed — see setup below)
├── .gitignore
└── README.md
cd /path/to/streamlitapppython3 -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windowspip install -r requirements.txtCreate .streamlit/secrets.toml in the project root (this file is gitignored):
API_KEY = "sk-your-openai-api-key-here"The app reads the key via st.secrets["API_KEY"]. Do not commit this file.
Alternative (global secrets): you can place the same file at ~/.streamlit/secrets.toml.
source .venv/bin/activate
streamlit run app.pyStreamlit opens in your browser (usually http://localhost:8501).
- Fill in Personal Information (name, experience, skills).
- Choose level, position, and company.
- Click Start Interview.
- Introduce yourself in the chat, then answer the interviewer’s questions (max 5 user messages).
- When the chat ends, click Get Feedback for your score and review.
- Click Restart Interview to reset and try again.
| Setting | Location | Default |
|---|---|---|
| OpenAI model | app.py → st.session_state["openai_model"] |
gpt-4o |
| Max user messages | app.py → user_message_count < 5 |
5 |
| Max chars per message | st.chat_input(..., max_chars=1000) |
1000 |
- Streamlit — UI
- OpenAI Python SDK — GPT-4o chat & feedback
- streamlit-js-eval — page reload on restart
| Issue | Solution |
|---|---|
StreamlitSecretNotFoundError |
Create .streamlit/secrets.toml with API_KEY = "sk-..." |
ModuleNotFoundError: streamlit_js_eval |
Run pip install streamlit-js-eval inside .venv |
insufficient_quota / 429 from OpenAI |
Add billing at OpenAI Billing |
| Wrong Python / missing packages | Activate .venv and run pip install -r requirements.txt |
- Never commit
.streamlit/secrets.tomlor expose your API key in code. - Interview content is sent to OpenAI for chat and feedback generation.
For personal / educational use unless otherwise specified.