This project is a Flask web application that generates short videos from text prompts using a pre-trained model. The app supports both CPU and GPU execution, detecting CUDA automatically for GPU acceleration.
- Generate videos from text using the
damo-vilab/text-to-video-ms-1.7b
model. - Web interface to input prompts and specify the number of frames.
- Preview or download the generated video.
- Supports GPU acceleration (if available).
-
Clone the repository:
git clone https://github.com/shahinur-alam/Text-to-Video-Generator.git cd Text-to-Video-Generator
-
Install dependencies:
pip install -r requirements.txt
-
Start the Flask server:
python app.py
-
Open the app in your browser at http://127.0.0.1:5000.
- Enter a prompt and number of frames in the form.
- Click "Generate Video."
- Preview or download the generated .mp4 video.
- GET /: Displays the video generation form.
- POST /: Processes the video generation request.
- GET /download/: Downloads the generated video.
- app.py: Main application.
- templates/index.html: Web interface.
- requirements.txt: Dependencies.