Yaron Koresh commited on
Commit
828c4cc
·
verified ·
1 Parent(s): 3b92e10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -72,8 +72,8 @@ def Piper(_do):
72
  height=480,
73
  width=480,
74
  negative_prompt="",
75
- num_inference_steps=100,
76
- guidance_scale=10
77
  )
78
 
79
  def infer(prompt1,prompt2,prompt3,prompt4):
@@ -84,24 +84,24 @@ def infer(prompt1,prompt2,prompt3,prompt4):
84
  else:
85
  prompt4 = " or " + " or ".join([translate(v,"english").upper() for v in prompt4])
86
 
87
- _dont = f'excluding any TEXT or LOGO{prompt4}'
88
 
89
  if prompt1 == None:
90
  prompt1 = "element"
91
  else:
92
- prompt1 = ", and ".join([ (translate(v,"english").upper()+_dont) for v in prompt1 ])
93
 
94
  if prompt2 == None:
95
  prompt2 = "elements"
96
  else:
97
- prompt2 = ", and ".join([ (translate(v,"english").upper()+_dont) 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'Realistic {prompt3}. Including realistic {prompt2}. The main focus must be on realistic {prompt1}.'
105
  print(_do)
106
  image = Piper(_do).images[0].save(name)
107
  return name
 
72
  height=480,
73
  width=480,
74
  negative_prompt="",
75
+ num_inference_steps=200,
76
+ guidance_scale=9
77
  )
78
 
79
  def infer(prompt1,prompt2,prompt3,prompt4):
 
84
  else:
85
  prompt4 = " or " + " or ".join([translate(v,"english").upper() for v in prompt4])
86
 
87
+ _dont = f'Show TEXT or LOGO{prompt4}.'
88
 
89
  if prompt1 == None:
90
  prompt1 = "element"
91
  else:
92
+ prompt1 = ", and ".join([ (translate(v,"english").upper()) for v in prompt1 ])
93
 
94
  if prompt2 == None:
95
  prompt2 = "elements"
96
  else:
97
+ prompt2 = ", and ".join([ (translate(v,"english").upper()) 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'Show {prompt3}; Include {prompt2}; Focus on {prompt1}.'
105
  print(_do)
106
  image = Piper(_do).images[0].save(name)
107
  return name