Yaron Koresh commited on
Commit
5bba4e8
·
verified ·
1 Parent(s): 9154d2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -80,28 +80,28 @@ def infer(prompt1,prompt2,prompt3,prompt4):
80
  name = generate_random_string(12)+".png"
81
 
82
  if prompt4 == None:
83
- prompt4 = " excluding, text, logos"
84
  else:
85
- prompt4 = " excluding, text, logos, " + ", ".join([translate(v,"english") for v in prompt4])
86
 
87
  prompt4 = prompt4.upper()
88
 
89
  if prompt1 == None:
90
- prompt1 = "element"
91
  else:
92
- prompt1 = ", and ".join([ (translate(v,"english")+" "+prompt4) for v in prompt1 ])
93
 
94
  if prompt2 == None:
95
- prompt2 = "elements"
96
  else:
97
- prompt2 = ", and ".join([ (translate(v,"english")+" "+prompt4) for v in prompt2 ])
98
 
99
  if prompt3 == None:
100
- prompt3 = "event"
101
  else:
102
- prompt3 = " ".join([translate(v,"english").upper() for v in prompt3]) + " event"
103
 
104
- _do = f'Produce, in a sensible way, {prompt3}, including, {prompt2}, glorifying, {prompt1}'
105
 
106
  image = Piper(_do).images[0].save(name)
107
  return name
 
80
  name = generate_random_string(12)+".png"
81
 
82
  if prompt4 == None:
83
+ prompt4 = " without text nor logo"
84
  else:
85
+ prompt4 = " without text nor logo " + " nor ".join([translate(v,"english") for v in prompt4])
86
 
87
  prompt4 = prompt4.upper()
88
 
89
  if prompt1 == None:
90
+ prompt1 = "focused elements" + prompt4
91
  else:
92
+ prompt1 = ", ".join([ "primary "+(translate(v,"english")+prompt4) for v in prompt1 ])
93
 
94
  if prompt2 == None:
95
+ prompt2 = "secondary elements" + prompt4
96
  else:
97
+ prompt2 = ", ".join([ "secondary "+(translate(v,"english")+prompt4) for v in prompt2 ])
98
 
99
  if prompt3 == None:
100
+ prompt3 = "event" + prompt4
101
  else:
102
+ prompt3 = ", ".join([ (translate(v,"english")+" "+prompt4) for v in prompt3 ])
103
 
104
+ _do = f'Rational fusion, from, {prompt3}, {prompt2}, {prompt1}'
105
 
106
  image = Piper(_do).images[0].save(name)
107
  return name