Skip to content

ShivaKumarS-code/Aura-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AI Icon Aura-AI: Image Caption Generator

React FastAPI Tailwind CSS Hugging Face

Aura-AI is a full-stack web application that generates captions for uploaded images using a powerful AI model. It leverages the BLIP (Bootstrapping Language-Image Pretraining) model from Hugging Face and provides a clean UI built with React and Tailwind CSS.


🛠️ Tech Stack

Frontend React, Tailwind CSS, Vite
Backend Python, FastAPI
AI Model BLIP (Hugging Face Transformers)

✨ Features

  • 📤 Upload any image - Support for multiple image formats
  • 🤖 AI-powered captions - Automatically generates descriptive captions
  • 📋 Copy to clipboard - One-click caption copying
  • 🎨 Clean, minimal UI - Modern design with Tailwind CSS
  • Fast API backend - Powered by FastAPI and Hugging Face Transformers

🚀 Installation & Setup

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Install dependencies:

    pip install -r requirements.txt
  3. Start the FastAPI server:

    uvicorn main:app --reload
    🌐 Server runs at http://127.0.0.1:8000

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Create a .env file with the following content:

    VITE_API_URL=http://127.0.0.1:8000
  4. Start the frontend dev server:

    npm run dev
    🌐 App will be available at http://localhost:5173

📁 Project Structure

📦 aura-ai
├── 📂 frontend
│   ├── 📄 App.jsx
│   ├── 📄 .env
│   ├── 📄 package.json
│   └── 📄 ...
├── 📂 backend
│   ├── 📄 main.py
│   ├── 📄 requirements.txt
│   └── 📄 ...
└── 📄 README.md

🔌 API Endpoint

POST /generate-caption

Accepts Multipart image file
Returns JSON with AI-generated caption
Content-Type multipart/form-data

Example Response:

{
  "caption": "a person standing in a field with mountains in the background"
}

🔧 Environment Variables

Frontend (.env)

VITE_API_URL=http://127.0.0.1:8000

Note: For production deployment, replace with your actual backend URL


🎯 Usage

  1. Start both backend and frontend servers
  2. Open your browser and navigate to http://localhost:5173
  3. Upload an image using the file input
  4. Wait for AI processing - caption will be generated automatically
  5. Copy the caption using the copy button

🚀 Deployment

Frontend Deployment

  • Deploy to Vercel, Netlify, or similar platforms
  • Update VITE_API_URL in environment variables

Backend Deployment

  • Deploy to Hugging Face Spaces, Railway, Heroku, or similar platforms
  • Ensure all dependencies are listed in requirements.txt

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ using React & FastAPI

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published