phenomenon1981 commited on
Commit
967a744
·
1 Parent(s): 24b84b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -33,16 +33,22 @@ def generate(starting_text):
33
  txt = grad.Textbox(lines=1, label="Initial Text", placeholder="English Text here")
34
  out = grad.Textbox(lines=4, label="Generated Prompts")
35
 
 
 
 
 
36
  title = "Stable Diffusion Prompt Generator"
37
- description = 'This is a demo of the model series: "MagicPrompt", in this case, aimed at: "Stable Diffusion". To use it, simply submit your text. To learn more about the model, [click here](https://huggingface.co/Gustavosta/MagicPrompt-Stable-Diffusion).<br>'
38
 
39
  grad.Interface(fn=generate,
40
  inputs=txt,
41
  outputs=out,
 
42
  title=title,
43
  description=description,
44
  article='',
45
  allow_flagging='never',
 
46
  theme="default").launch(enable_queue=True, debug=True)
47
 
48
 
 
33
  txt = grad.Textbox(lines=1, label="Initial Text", placeholder="English Text here")
34
  out = grad.Textbox(lines=4, label="Generated Prompts")
35
 
36
+ examples = []
37
+ for x in range(8):
38
+ examples.append(line[random.randrange(0, len(line))].replace("\n", "").lower().capitalize())
39
+
40
  title = "Stable Diffusion Prompt Generator"
41
+ description = 'This is a demo of the model series: "MagicPrompt", in this case, aimed at: "Stable Diffusion". To use it, simply submit your text or click on one of the examples. To learn more about the model, [click here](https://huggingface.co/Gustavosta/MagicPrompt-Stable-Diffusion).<br>'
42
 
43
  grad.Interface(fn=generate,
44
  inputs=txt,
45
  outputs=out,
46
+ examples=examples,
47
  title=title,
48
  description=description,
49
  article='',
50
  allow_flagging='never',
51
+ cache_examples=False,
52
  theme="default").launch(enable_queue=True, debug=True)
53
 
54