Spaces:
Running
Running
File size: 3,264 Bytes
8f98e92 5e3d8c8 8f98e92 9a255bf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
---
title: HackBuddyAI
emoji: π§βπ€βπ§
colorFrom: purple
colorTo: pink
sdk: gradio
sdk_version: 5.34.2
app_file: app.py
pinned: false
license: apache-2.0
short_description: Instantly match hackathon participants into ideal teams!
---
# π€ AI-Powered HackBuddyAI
This project is a web application that helps hackathon organizers automatically form balanced teams from a list of participants. It uses a `TinyCodeAgent` to analyze participant skills and goals, creating optimal teams based on criteria defined by the organizer.
The application features a two-tab interface:
1. **Participant Registration**: A form for participants to submit their profile, including skills, background, and what they want to achieve during the hackathon.
2. **Organizer Dashboard**: A view for the organizer to see all registered participants, define matching criteria, and run the AI-powered team formation process.
## Tech Stack
- **Backend**: Python
- **AI Agent Framework**: `TinyCodeAgent`
- **Web UI**: Gradio
- **Data Handling**: Pandas
- **Database**: SQLite
---
## Setup and Installation
### 1. Prerequisites
- Python 3.8+
- An OpenAI API key
### 2. Installation
1. **Clone the repository** (if applicable) or ensure you have the project files in a directory.
2. **Navigate to the project directory**:
```bash
cd path/to/project
```
3. **Create a virtual environment** (recommended):
```bash
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```
4. **Install dependencies**:
The project relies on the `tinyagent` library. Assuming it is available in your environment, install the other required packages:
```bash
pip install -r hackathon_organizer/requirements.txt
```
### 3. Configure Environment Variables
You must set your OpenAI API key as an environment variable. The application will not run without it.
- **On macOS/Linux**:
```bash
export OPENAI_API_KEY="your_api_key_here"
```
- **On Windows (Command Prompt)**:
```bash
set OPENAI_API_KEY="your_api_key_here"
```
---
## π Running the Application
Once the setup is complete, you can launch the Gradio web application using one of the following methods:
### Method 1: Using the main script (recommended)
```bash
python main.py
```
This script handles all the necessary path configurations and launches the application.
### Method 2: Running app.py directly
```bash
cd hackathon_organizer
python app.py
```
Either method will start a local web server, and you can access the application at the URL provided in the console (usually `http://127.0.0.1:7860`).
The application will create a `hackathon_participants.db` file in the working directory to store the participant data.
---
## π§ͺ Running Tests
The project includes unit tests for the database and the agent setup logic. The tests are located in the `tests/` directory.
To run the tests:
```bash
# From the project root directory
cd hackathon_organizer
python -m unittest discover tests
```
The tests are designed to run without needing an active internet connection or a valid API key. They use mocks to simulate agent behavior and an in-memory database for testing database operations. |