Spaces:
Runtime error
Runtime error
title: Structured Prompted Gif | |
emoji: 🖼 | |
colorFrom: purple | |
colorTo: red | |
sdk: gradio | |
sdk_version: 4.26.0 | |
app_file: app.py | |
pinned: false | |
license: mit | |
short_description: 'Generate GIF with structured prompts in recent HF paper' | |
# Structured Prompt GIF Generator | |
This application generates GIFs from text prompts using the Hotshot-XL model. It is built with Gradio and hosted on Hugging Face Spaces. | |
## How to Use | |
1. **Enter a Prompt**: You can use the default prompt template or enter your own custom prompt. | |
2. **Generate GIF**: Click on the button to generate a GIF based on your prompt. | |
3. **Download GIF**: Once generated, you can download and view the GIF. | |
## Default Prompt Template | |
Note: Not every part of the template needs to be used, but they should be formatted in order presented, skipping any you don't use, | |
to retain prompt effectiveness (see other examples below) | |
{ | |
subject: | |
action: | |
setting: | |
style: | |
duration: | |
} | |
## My Example: {subject, action, setting, style, duration} | |
Create a GIF with the subject being a 'Technical Difficulties' television program interruption. | |
The action should show colored glitchy and typical 'technical difficulties' cable interruptions, (using|with) demonic symbols | |
glitching out along with the colors of the usual 'tech difficulties' broadcasts. | |
The setting should be (an older|a vintage) tv cable broadcast signal interruption with rainbow colors and glitchy effects. | |
The style should be a realistic cable interruption interlaced with (demonic imagery|dark symbols) glitching out along with the | |
typical color page of interruption in TV cable connection issues. | |
The GIF should last for 1 second. | |
## Custom Prompts - Should always include at least "subject", "action", and "duration". "style" and "setting" are not required but may create better results | |
You can customize the prompt to generate different types of GIFs. | |
Simply enter your text in the provided textbox and click the button to generate a GIF. | |
### Example Prompts | |
1. **Cat Jumping Over a Fence**: {"subject, action, style, duration"} | |
Create a GIF of a cat jumping over a fence in a sunny backyard. | |
The style should be realistic. | |
The GIF should last for 2 seconds. | |
2. **Rocket Launch**: {"subject, action, setting, style, duration"} | |
Create a GIF of a rocket. | |
The Rocket should be launching into space. | |
The scene should show the rocket taking off from the launchpad with smoke and fire. | |
The style should be cinematic. | |
The GIF should last for 3 seconds. | |
## Technical Details | |
This application uses the `hotshotco/Hotshot-XL` model from Hugging Face. The prompt is processed to select the first option from regex choices before generating the GIF. | |
## Dependencies | |
- `gradio` | |
- `transformers` | |
These dependencies are managed automatically by Hugging Face Spaces. | |
## Contributing | |
If you have any suggestions or improvements, feel free to open an issue or submit a pull request. | |
## License | |
This project is licensed under the MIT License. | |
MIT License | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all | |
copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
SOFTWARE. | |