Skip to content

ectorr01/fastapi-multi-function-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FastAPI Multi-Function Web App

A simple web application built with FastAPI that provides multiple AI-powered features:

  • Text translation (English β†’ French)
  • Sentiment analysis
  • Person detection in images using YOLOv8

The app uses modern ML models and is served through a Jinja2 HTML template interface.


🧠 Features

  1. Translation: Translate English text to French using Hugging Face Transformers.
  2. Sentiment Analysis: Analyze the sentiment of any given text.
  3. Object Detection: Detect people in uploaded images using YOLOv8 from Ultralytics.

πŸ› οΈ Technologies Used

Library Purpose
FastAPI Backend framework for building APIs
Transformers For NLP tasks like translation and sentiment analysis
YOLOv8 (Ultralytics) For real-time object detection in images
Torch (PyTorch) Machine learning backend used by both Transformers and YOLO
OpenCV Image manipulation and saving annotated results
Jinja2 HTML templating engine
Uvicorn ASGI server to run the FastAPI app

πŸš€ How to Run the App

1. Clone the repository:

git clone https://github.com/ectorr01/fastapi-multi-function-app.git
cd fastapi-multi-function-app

2. (Optional) Create and activate a virtual environment:

python -m venv venv
source venv/bin/activate    # Linux/macOS
venv\Scripts\activate       # Windows

3. Install dependencies:

pip install -r requirements.txt

4. Run the app:

uvicorn main:app --reload

5. Open in browser:

Go to: http://localhost:8000


πŸ“ Project Structure

fastapi-multi-function-app/
β”œβ”€β”€ main.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ templates/
β”‚   └── index.html
└── static/

βœ… Requirements

Make sure you have installed:

  • Python 3.8+
  • FastAPI
  • Uvicorn
  • Transformers
  • Torch
  • Ultralytics (YOLO)
  • OpenCV (opencv-python-headless)
  • Jinja2

All required packages are listed in requirements.txt.


About

A simple web application built with **FastAPI** that provides multiple AI-powered features

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages