Skip to content

awerks/website

Repository files navigation

Captionyx

Website built with FastAPI, a lightweight ASGI web application framework in Python.

Description

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.

Installation

Prerequisites

  • Python 3.7+
  • pip (Python package manager)

Setup

  1. Clone the repository:
git clone https://github.com/yourusername/flask_app.git
cd flask_app
  1. Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Usage

  1. Start the application:
fastapi dev
# or
python3 main.py
  1. Access the application at http://localhost:8000 in your web browser.

Project Structure

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

Dependencies

  • FastAPI - Web framework
  • SQLAlchemy - ORM for database operations
  • Other dependencies listed in requirements.txt

Configuration

Configuration settings are stored in config.py and environment variables:

  • FASTAPI_SECRET_TOKEN: Development or production environment
  • FASTAPI_SECRET_KEY: Secret key for session security
  • BOT_TOKEN: Token for the bot
  • DATABASE_URL: Database connection string

Development

Code Style

This project follows PEP 8 style guide. You can check your code with:

flake8 .

License

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

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors