voidDescriptor commited on
Commit
0ec9dd4
1 Parent(s): 563d084

Update README.md

Browse files

updated instructions for use

Files changed (1) hide show
  1. README.md +95 -1
README.md CHANGED
@@ -8,6 +8,100 @@ sdk_version: 4.26.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
11
  ---
 
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
+ short_description: 'Generate GIF with structured prompts in recent HF paper'
12
  ---
13
+ # Structured Prompt GIF Generator
14
 
15
+ This application generates GIFs from text prompts using the Hotshot-XL model. It is built with Gradio and hosted on Hugging Face Spaces.
16
+
17
+ ## How to Use
18
+
19
+ 1. **Enter a Prompt**: You can use the default prompt template or enter your own custom prompt.
20
+ 2. **Generate GIF**: Click on the button to generate a GIF based on your prompt.
21
+ 3. **Download GIF**: Once generated, you can download and view the GIF.
22
+
23
+ ## Default Prompt Template
24
+ 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,
25
+ to retain prompt effectiveness (see other examples below)
26
+
27
+ {
28
+ subject:
29
+ action:
30
+ setting:
31
+ style:
32
+ duration:
33
+ }
34
+
35
+ ## My Example: {subject, action, setting, style, duration}
36
+
37
+ Create a GIF with the subject being a 'Technical Difficulties' television program interruption.
38
+ The action should show colored glitchy and typical 'technical difficulties' cable interruptions, (using|with) demonic symbols
39
+ glitching out along with the colors of the usual 'tech difficulties' broadcasts.
40
+ The setting should be (an older|a vintage) tv cable broadcast signal interruption with rainbow colors and glitchy effects.
41
+ The style should be a realistic cable interruption interlaced with (demonic imagery|dark symbols) glitching out along with the
42
+ typical color page of interruption in TV cable connection issues.
43
+ The GIF should last for 1 second.
44
+
45
+
46
+ ## Custom Prompts - Should always include at least "subject", "action", and "duration". "style" and "setting" are not required but may create better results
47
+
48
+ You can customize the prompt to generate different types of GIFs.
49
+ Simply enter your text in the provided textbox and click the button to generate a GIF.
50
+
51
+ ### Example Prompts
52
+
53
+ 1. **Cat Jumping Over a Fence**: {"subject, action, style, duration"}
54
+
55
+ Create a GIF of a cat jumping over a fence in a sunny backyard.
56
+ The style should be realistic.
57
+ The GIF should last for 2 seconds.
58
+
59
+ 2. **Rocket Launch**: {"subject, action, setting, style, duration"}
60
+
61
+ Create a GIF of a rocket.
62
+ The Rocket should be launching into space.
63
+ The scene should show the rocket taking off from the launchpad with smoke and fire.
64
+ The style should be cinematic.
65
+ The GIF should last for 3 seconds.
66
+
67
+
68
+
69
+
70
+ ## Technical Details
71
+
72
+ 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.
73
+
74
+ ## Dependencies
75
+
76
+ - `gradio`
77
+ - `transformers`
78
+
79
+ These dependencies are managed automatically by Hugging Face Spaces.
80
+
81
+ ## Contributing
82
+
83
+ If you have any suggestions or improvements, feel free to open an issue or submit a pull request.
84
+
85
+ ## License
86
+
87
+ This project is licensed under the MIT License.
88
+
89
+ MIT License
90
+
91
+ Permission is hereby granted, free of charge, to any person obtaining a copy
92
+ of this software and associated documentation files (the "Software"), to deal
93
+ in the Software without restriction, including without limitation the rights
94
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
95
+ copies of the Software, and to permit persons to whom the Software is
96
+ furnished to do so, subject to the following conditions:
97
+
98
+ The above copyright notice and this permission notice shall be included in all
99
+ copies or substantial portions of the Software.
100
+
101
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
102
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
103
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
104
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
105
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
106
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
107
+ SOFTWARE.