reel-caption-maker/README.md

115 lines
3.6 KiB
Markdown
Raw Permalink Normal View History

2024-10-14 16:34:41 +00:00
# Reel Caption Maker
2024-10-14 04:03:17 +00:00
2024-10-14 16:34:41 +00:00
Reel Caption Maker is a tool for adding captions to Instagram reels. This guide will help you set up and run the application, even if you're not a developer.
2024-10-14 17:57:17 +00:00
![capture.png](capture.png)
2024-10-14 18:01:37 +00:00
Example
![exemple.png](exemple.png)
2024-10-14 16:34:41 +00:00
## Prerequisites
Before you begin, make sure you have the following installed on your computer:
2024-10-14 18:07:07 +00:00
1. Git: Download from [git-scm.com](https://git-scm.com/downloads)
2. Either Python (more performant) or Docker (easier to install, but heavier)
- Python 3.12 or newer: Download from [python.org](https://www.python.org/downloads/)
- Docker Desktop, from [docker.com](https://www.docker.com/products/docker-desktop/)
3. Have at least 8 GB RAM, because the model needs 3.
2024-10-14 16:34:41 +00:00
## Installation Steps
1. Open your computer's terminal or command prompt.
2024-10-14 17:17:17 +00:00
2. Clone the repository:
2024-10-14 16:34:41 +00:00
```
git clone https://git.jevalide.ca/partage/reel-caption-maker.git
2024-10-14 16:34:41 +00:00
cd reel-caption-maker
```
### Option 1: Using Python locally (faster, but harder to setup)
2024-10-14 17:17:17 +00:00
2024-10-14 16:34:41 +00:00
3. Create a virtual environment:
- On Windows:
```
python -m venv venv
venv\Scripts\activate
```
- On macOS and Linux:
```
python3 -m venv venv
source venv/bin/activate
```
4. Install the required packages:
```
pip install -r requirements.txt
```
2024-10-14 18:07:07 +00:00
#### Running the Application
2024-10-14 16:34:41 +00:00
1. Make sure you're in the project directory and your virtual environment is activated.
2. Start the Streamlit app:
```
streamlit run app.py
```
3. Your default web browser should open automatically. If it doesn't, copy the URL shown in the terminal (usually http://localhost:8501) and paste it into your browser.
### Option 2: Using Docker (easier, but takes more resources)
2024-10-14 17:17:17 +00:00
To run the Reel Caption Maker using Docker, follow these steps:
1. Ensure you have Docker installed on your system.
2. If not, you can download and install it from [Docker's official website](https://www.docker.com/get-started).
3. Build the Docker image:
```
docker build -t reel-caption-maker .
```
4. Run the Docker container:
```
docker run -p 8501:8501 -v whisper_model:/root/.cache/huggingface reel-caption-maker
```
This command does the following:
- Maps port 8501 from the container to port 8501 on your host machine.
- Creates a volume named `whisper_model` to persist the Whisper model data.
5. Open your web browser and navigate to `http://localhost:8501` to use the Reel Caption Maker.
- Note: The first time you run the container, it may take a few minutes to download the Whisper model. Subsequent runs will be faster as the model will be cached in the Docker volume.
- To stop the container, use `Ctrl+C` in the terminal where it's running.
- For convenience, you can use the provided `docker-run.sh` script to start the container:
```
chmod +x docker-run.sh
./docker-run.sh
```
2024-10-14 16:34:41 +00:00
## Using Reel Caption Maker
1. Click "Browse files" to upload your video.
2. Select the video language (French or English).
3. Click "Generate Captions" to transcribe the audio.
4. Edit the generated captions if needed.
5. Click "Burn Captions and Download" to add the captions to your video and download it.
## Troubleshooting
- If you encounter any errors, make sure you've followed all the steps correctly.
- Ensure that your virtual environment is activated when running the application.
- If you're still having issues, try closing the terminal, reopening it, and starting from step 3 of the Installation Steps.
## Closing the Application
To stop the application, press Ctrl+C in the terminal where the app is running.
Remember to deactivate the virtual environment when you're done:
```
deactivate
```
Enjoy using Reel Caption Maker!