Skip to content

QuadraBytes/interview-assistant-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interview Assistant Backend

This project is a FastAPI backend that uses a fine-tuned Hugging Face transformer model to generate interview-style questions and answers from user input.
It applies text preprocessing (stopword removal, keyword extraction) before sending the input to the model to improve generation quality.


Features

  • REST API built with FastAPI
  • Text preprocessing (stopword removal, keyword filtering)
  • Integration with a Hugging Face text-generation model
  • Extracts structured JSON (question & answer) from model output

Project Structure

project-backend/
├── src/
│   └── main.py         # FastAPI application
├── .venv/              # Virtual environment
├── requirements.txt    # Python dependencies
└── README.md           # Documentation

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/interview-assistant-backend.git
    cd interview-assistant-backend
  2. Create and activate a virtual environment:

    python -m venv .venv
    .venv\Scripts\activate   # On Windows
    source .venv/bin/activate # On Linux/Mac
  3. Install dependencies:

    pip install -e .

Running the Server

Start the FastAPI app with Uvicorn:

cd src
uvicorn main:app

The server will start at: http://127.0.0.1:8000


API Usage

  • Endpoint: /generate (POST)

Request Body:

{
  "text": "Can you tell me about React static decorators?"
}

Preprocessing applied:

react static decorators

Example Response:

{
  "question": "What is React Static Decorators?",
  "answer": "Decorators that change the behavior of React components but render the same after the render() call, ensuring React interoperability."
}

If parsing fails:

{
  "error": "Could not parse the generated text."
}

Requirements

  • Python 3.9+
  • FastAPI
  • Uvicorn
  • Transformers (Hugging Face)
  • NLTK (for preprocessing)

Install everything with:

pip install -e .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages