Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gen-AI Project

A full-stack Generative AI application featuring a Flask-based backend with multiple AI agents and a Next.js frontend for interactive visualization.

Features

  • Backend (Flask API): Provides REST endpoints for various AI agents including:
    • Agent 0: Chat functionality
    • Agent 1: Resume screening
    • Agent 2-4: Additional agents (placeholders for future implementation)
  • Frontend (Next.js): Interactive web interface with 3D pipeline visualization using Three.js and Tailwind CSS.

Prerequisites

Before running this project, ensure you have the following installed on your system:

  • Python 3.8 or higher
  • Node.js 18 or higher (includes npm)
  • Git (for cloning the repository)

Setup Instructions

1. Clone or Navigate to the Project Directory

If you haven't already, clone the repository or navigate to the project folder:

cd /Users/ishikadutta/Desktop/ishika\ codes\ 2025/Gen-AI

2. Backend Setup

  1. Navigate to the Backend directory:

    cd Backend
  2. Create a virtual environment (recommended):

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Python dependencies:

    pip install -r requirements.txt
  4. Set up environment variables:

    • Copy the .env file or create one if it doesn't exist.
    • Add your API keys (see Environment Variables section below).
  5. Run the Flask server:

    python3 main.py

    The backend will start on http://localhost:5000 (default Flask port).

3. Frontend Setup

  1. Open a new terminal and navigate to the frontend directory:

    cd ../gen-ai-frontend
  2. Install Node.js dependencies:

    npm install
  3. Start the development server:

    npm run dev

    The frontend will be available at http://localhost:3000.

Environment Variables

The backend requires the following environment variables in the .env file:

  • GROQ_API_KEY: Your Groq API key for AI model access
  • MODEL_NAME: The name of the AI model (e.g., 'qwen-2.5-32b')
  • MODEL_ID: The ID of the AI model (same as MODEL_NAME)
  • EXA_API_KEY: Your Exa API key for web search functionality

Important: Never commit your .env file to version control. Get your own API keys from:

Running the Application

  1. Ensure both backend and frontend servers are running:

    • Backend: http://localhost:5000
    • Frontend: http://localhost:3000
  2. Open your browser and go to http://localhost:3000 to access the application.

  3. The frontend will communicate with the backend API to interact with the AI agents.

API Endpoints

The backend provides the following endpoints:

  • GET /: Health check
  • POST /api/agent0/chat: Chat with Agent 0
  • POST /api/agent1/screen: Resume screening with Agent 1
  • GET /api/agent1/logs: Get Agent 1 logs

Troubleshooting

  • Backend fails to start: Check if all dependencies are installed and API keys are set correctly.
  • Frontend build errors: Ensure Node.js version is 18+ and run npm install again.
  • CORS errors: The backend has CORS enabled, but ensure both servers are running on the correct ports.
  • Python import errors: Make sure you're in the correct directory and virtual environment is activated.

Project Structure

Gen-AI/
├── Backend/
│   ├── main.py                 # Flask API server
│   ├── requirements.txt        # Python dependencies
│   ├── .env                    # Environment variables (not committed)
│   ├── Agents/                 # AI agent implementations
│   │   ├── Agent0/
│   │   ├── Agent1/
│   │   └── ...
│   └── templates/              # HTML templates
├── gen-ai-frontend/
│   ├── package.json            # Node.js dependencies
│   ├── src/
│   │   ├── app/                # Next.js app directory
│   │   └── components/         # React components
│   └── public/                 # Static assets
└── setup.bat                   # Windows setup script (for reference)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test both backend and frontend
  5. Submit a pull request

License

This project is for educational purposes. Please check individual component licenses.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages