Skip to content

Thebinary-bard/hackathon-mockup

Repository files navigation

Hackathon Mockup Backend

Simple FastAPI backend for video/audio analysis with Whisper and Gemini.

Project Layout

  • main.py - current FastAPI entrypoint kept for uvicorn main:app
  • app/main.py - package entrypoint alias for a cleaner import path
  • data/keywords.json - keyword dictionary used by detection
  • temp/ - runtime scratch space for extracted media

Dependencies

  • FastAPI - pip install fastapi
  • Uvicorn - pip install uvicorn
  • Whisper - pip install openai-whisper
  • Multipart form support - pip install python-multipart
  • Gemini SDK - pip install google-genai
  • Dotenv support - pip install python-dotenv
  • FFmpeg - sudo apt install ffmpeg

Run Locally

  1. Create and activate a virtual environment:
    python3 -m venv .venv
    source .venv/bin/activate
  2. Install Python dependencies:
    pip install -r requirements.txt
  3. Create your local environment file:
    cp .env.example .env
  4. Open .env and set your GEMINI_API_KEY value.
  5. Make sure ffmpeg is installed on your machine.
  6. Start the FastAPI server:
    uvicorn main:app --reload --port 9000
  7. Open the API at:
    http://127.0.0.1:9000
    

Run With Docker

  1. Build the image:
    docker build -t hackathon-mockup-backend .
  2. Run the container and pass your Gemini API key:
    docker run --rm -p 9000:9000 --env-file .env hackathon-mockup-backend
  3. Open the API at:
    http://127.0.0.1:9000
    

Run With Docker Compose

  1. Start with compose:
    docker compose up --build
  2. Run in detached mode:
    docker compose up --build -d
  3. Stop services:
    docker compose down

Notes

  • The root keywords.json is kept as a compatibility link to data/keywords.json so the existing entrypoint keeps working.
  • No application logic was refactored as part of this cleanup.

About

AI-powered surveillance backend that analyzes CCTV footage by extracting audio, transcribing speech, detecting suspicious keywords, and classifying intent using LLMs for real-time threat assessment.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors