Skip to content

sakshi26s/Interview-Coach

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Interview Roleplay Coach - Project Documentation

1. Full Project Explanation:

The Interview Roleplay Coach is a Python-based desktop application designed to help engineering students prepare for technical and HR interviews. It simulates a mock interview environment by presenting questions from selected subjects (Java or DBMS) along with an HR question.

How it works:

  • Questions Database (questions.json): Contains an extensible list of interview questions categorized by topics. Each question includes "ideal keywords" expected in a strong answer.
  • Rule-based Evaluator (evaluator.py): Analyzes the user's text answer based on:
    • Length: Penalizes answers that are too short or excessively verbose.
    • Keywords Match: Checks if the user included the technical jargon specific to the question.
    • Action Words: Awards bonus points for strong verbs (e.g., "developed", "achieved").
  • Data Handler (data_handler.py): Records the user's score to a CSV file (sample_history.csv) and uses matplotlib to plot line and bar charts tracking performance over time.
  • Tkinter GUI (gui.py & main.py): Provides a user-friendly interface with a 60-second countdown timer per question, immediate feedback screens, and an interactive final report dashboard.

2. Folder Structure

Interview_Coach/
│
├── main.py              # Application entry point
├── gui.py               # Tkinter frontend code (UI & timers)
├── interview.py         # Session state manager & question fetcher
├── evaluator.py         # Rule-based text evaluation scoring logic
├── data_handler.py      # Pandas & Matplotlib integration for CSV files
│
├── questions.json       # JSON database of Java/DBMS/HR questions
├── sample_history.csv   # History dataset of previous attempts
└── README.md            # This documentation file

3. Step-by-Step Execution Guide

  1. Prerequisites: Ensure you have Python installed along with pandas and matplotlib.
    pip install pandas matplotlib
  2. Launch the App: Open your terminal, navigate to the Interview_Coach folder, and run:
    python main.py
  3. Usage Flow:
    • Click either "Java Interview" or "DBMS Interview" on the main menu.
    • For each question, type your answer in the text box. Note the 60-second timer counting down. You can click Submit Answer before the time runs out.
    • Review the immediate feedback mapping your Strengths and Weaknesses. Click Next to proceed.
    • At the end of the session, view your Total Score and Personalized Improvement Tips.
    • Click View Progress Dashboard to open the matplotlib performance charts.

4. Sample Output Screenshots (Text Description)

  • Start Screen: A clean window with a bold welcome title. Two central buttons, a green "Java Interview" and a blue "DBMS Interview", and a button below to "View Past Performance Graphs".
  • Question Screen: Displays the timer in red at the top right ("Time left: 45s"). The question is centered. A large white text box allows the user to type their answer. A yellow "Submit Answer" button is at the bottom.
  • Feedback Screen: Displays the score out of 10. A green section lists Strengths (e.g., " Used strong action verbs"). A red section lists Areas for Improvement (e.g., " Missed some key technical concepts").
  • Data Dashboard: A Matplotlib popup containing two subplots:
    • Left: A line graph plotting "Score %" vs "Attempt Number" for all history.
    • Right: A bar chart comparing the "Average Score %" between Java and DBMS.

5. Viva Questions & Answers

Q1: Why did you choose a rule-based approach over Machine Learning for evaluating answers? Answer: For a mini-project, a rule-based logic checking text length, specific expected keywords, and action words provides predictable, deterministic, and easily explainable feedback compared to building and training an ML NLP model. It achieves the core goal without heavy processing requirements.

Q2: What is the purpose of the __init__ method in Python classes? Answer: The __init__ method acts as a constructor. It initializes the completely new object's attributes when an instance of a class is created. For example, in InterviewSession, it sets up the question index and loads the questions.

Q3: How does the timer functionality work without freezing the Tkinter GUI? Answer: Tkinter operates on a single-threaded event loop. To avoid freezing the UI with a time.sleep() call, the timer uses the root.after(1000, callback) method. This schedules the update_timer function to run after 1000 milliseconds, allowing Tkinter to remain responsive in the meantime.

Q4: Explain how Pandas and Matplotlib are integrated into your project. Answer: pandas is used to structure the interview results into a DataFrame and append them seamlessly to sample_history.csv. Under the DataHandler class, we use pandas to group data (e.g., average score by subject) and then natively plot those DataFrames using matplotlib.pyplot for the user dashboard.

Q5: What are the benefits of separating the code into multiple files (modular programming)? Answer: Modularity ensures the code is readable, reusable, and easier to debug. For instance, the evaluator.py can be tested purely on text inputs independent of the gui.py, which is strictly responsible for Tkinter elements.

6. Possible Future Improvements

  1. NLP Integration: Replace rule-based checking with Natural Language Processing (e.g., spacy or HuggingFace transformers) to evaluate the meaning of the sentence rather than purely string matching.
  2. Speech-to-Text: Allow the user to speak their answers using a microphone library (SpeechRecognition) instead of typing them.
  3. User Profiles: Enhance the DataHandler to support multiple distinct users tracking separate historical CSV files rather than a single shared file.
  4. Dynamic Resourcing: Connect the questions.json equivalent to a backend API (like an LLM API) to automatically generate new unseen questions.

About

Python-based Interview Roleplay Coach that simulates technical interviews, evaluates responses, and tracks performance using structured question sets and history data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages