phenomenon1981 commited on
Commit
328e66f
·
1 Parent(s): eb01c7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -3,11 +3,11 @@ import gradio as grad, random, re
3
 
4
 
5
  gpt2_pipe = pipeline('text-generation', model='Gustavosta/MagicPrompt-Stable-Diffusion', tokenizer='gpt2')
6
- with open("ideas.txt", "r") as f:
7
- line = f.readlines()
8
 
9
 
10
  def generate(starting_text):
 
 
11
  seed = random.randint(100, 1000000)
12
  set_seed(seed)
13
 
@@ -30,6 +30,7 @@ def generate(starting_text):
30
  return response_end
31
 
32
 
 
33
  txt = grad.Textbox(lines=1, label="Initial Text", placeholder="Enter a basic idea")
34
  out = grad.Textbox(lines=5, label="Generated Prompts")
35
 
 
3
 
4
 
5
  gpt2_pipe = pipeline('text-generation', model='Gustavosta/MagicPrompt-Stable-Diffusion', tokenizer='gpt2')
 
 
6
 
7
 
8
  def generate(starting_text):
9
+ with open("ideas.txt", "r") as f:
10
+ line = f.readlines()
11
  seed = random.randint(100, 1000000)
12
  set_seed(seed)
13
 
 
30
  return response_end
31
 
32
 
33
+
34
  txt = grad.Textbox(lines=1, label="Initial Text", placeholder="Enter a basic idea")
35
  out = grad.Textbox(lines=5, label="Generated Prompts")
36