Website built with FastAPI, a lightweight ASGI web application framework in Python.
This is a FastAPI-based web application that provides a simple way to generate subtitles for videos. It uses the OpenAI Whisper model for automatic speech recognition (ASR) and provides a user-friendly interface for uploading videos and downloading subtitles.
- Python 3.7+
- pip (Python package manager)
- Clone the repository:
git clone https://github.com/yourusername/flask_app.git
cd flask_app- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Start the application:
fastapi dev
# or
python3 main.py- Access the application at
http://localhost:8000in your web browser.
website/
├── main.py # Main application entry point
├── requirements.txt # Project dependencies
├── static/ # Static files (CSS, JS, images)
├── templates/ # HTML templates
├── routes/ # API routes and views
└── utils/ # Utility functions
- FastAPI - Web framework
- SQLAlchemy - ORM for database operations
- Other dependencies listed in
requirements.txt
Configuration settings are stored in config.py and environment variables:
FASTAPI_SECRET_TOKEN: Development or production environmentFASTAPI_SECRET_KEY: Secret key for session securityBOT_TOKEN: Token for the botDATABASE_URL: Database connection string
This project follows PEP 8 style guide. You can check your code with:
flake8 .This project is licensed under the MIT License - see the LICENSE file for details.