A Gradio web interface for optimizing prompts and generating videos using Amazon's Nova Canvas and Reel model.
- Add Long Video Generation.
Expand an input from the user, generate a storyboard, create breakdown shots, and generate a long video
-
Prompt:我心目中的AWS像一柄利剑,帮我在数字化转型的道路上披荆斩棘。
video demo1 file
-
Prompt:wonderful under sea world
video demo2 file
example:
- Add QR Code generation for long video. The viewers can download the artifacts in their phone
- Add seed, cfg scale, Aspect ratio
- Add option to enable/disable comparison mode
- Text prompt optimization for Nova Canvas image generation
- Text prompt optimization for Nova Reel video generation
- 1-click automatically optimize any languages & any prompts, with the reference of Nova official guideline.
- 1-click to copy the generated image from Canvas to for Reel video generation
- Real-time prompt optimization using Nova
- Comparison Videos generation from original prompt and optimized prompt
- User-friendly web interface
- Python 3.10+
- AWS credentials configured with access to Bedrock and S3
- An S3 bucket for video output (You can copy the default bucket created from Nova Reel when you first time play with it in Bedrock Console)
- Install the required Python packages:
pip install -r requirements.txt
-
Make sure you have AWS credentials configured with appropriate permissions for:
- Amazon Nova Pro/Lite/Canvas and Reel
- S3 bucket access
-
Update the S3 bucket name in WebUI or you can change it in
config.py
DEFAULT_BUCKET=
:
- Start the Gradio interface:
python app.py
-
Open your web browser and navigate to the URL shown in the terminal (typically http://127.0.0.1:7860)
-
- Enter your prompt in the text box
- Optionally upload an image or 1-click copy from Image generation
- Click "Optimze Prompt" to start the create Optimized Prompt and Negative Prompt (If needed)
- Click "Generate Image" to start the create image
- View the optimized prompt and generated video
- You can compare the videos between original and optimized version
-
Long video generation
- The application uses Amazon Nova to optimize prompts for better video generation results
- I found sometimes that
Nova Pro
works better for image optimzation whileNova Lite
works better for video, so you can switch the model to try. - Video generation may take several minutes to complete
- Generated videos are temporarily stored in the
generated_videos
directory - Generated images are temporarily stored in the
generated_images
directory - Both English and Chinese prompts are supported, but optimized prompts will be in English
海底漫游的视频
a video of walking in a underwater world