Yaron Koresh commited on
Commit
591b9cb
·
verified ·
1 Parent(s): 4a950f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -96,10 +96,10 @@ def infer(prompt1,prompt2,prompt3,prompt4):
96
  if prompt4 == None:
97
  prompt4 = ""
98
  else:
99
- prompt4 = ", " + ", ".join([translate(v,"english").upper() for v in prompt4])
100
 
101
  _do = f'Show an authentic {prompt3} scene, while focusing on the details, of {prompt1}, as the main elements, and, showing {prompt2} in the background.'
102
- _dont = f'ANY PRESENTATION of: TEXT, LOGO{prompt4} !!!'
103
  print(_do)
104
  print(_dont)
105
  image = Piper(_do, _dont).images[0].save(name)
@@ -134,7 +134,7 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css) as demo:
134
  prompt1 = gr.Dropdown(
135
  multiselect=True,
136
  allow_custom_value=True,
137
- max_choices=3,
138
  label="Foreground Elements",
139
  show_label=True,
140
  container=True
@@ -143,7 +143,7 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css) as demo:
143
  prompt2 = gr.Dropdown(
144
  multiselect=True,
145
  allow_custom_value=True,
146
- max_choices=4,
147
  label="Background Elements",
148
  show_label=True,
149
  container=True
@@ -161,7 +161,7 @@ with gr.Blocks(theme=gr.themes.Soft(),css=css) as demo:
161
  prompt4 = gr.Dropdown(
162
  multiselect=True,
163
  allow_custom_value=True,
164
- max_choices=5,
165
  label="Forbidden Elements/Events",
166
  show_label=True,
167
  container=True
 
96
  if prompt4 == None:
97
  prompt4 = ""
98
  else:
99
+ prompt4 = "/" + "/".join([translate(v,"english").upper() for v in prompt4])
100
 
101
  _do = f'Show an authentic {prompt3} scene, while focusing on the details, of {prompt1}, as the main elements, and, showing {prompt2} in the background.'
102
+ _dont = f'PRESENTATION/USAGE of TEXT/LOGO{prompt4}.'
103
  print(_do)
104
  print(_dont)
105
  image = Piper(_do, _dont).images[0].save(name)
 
134
  prompt1 = gr.Dropdown(
135
  multiselect=True,
136
  allow_custom_value=True,
137
+ max_choices=2,
138
  label="Foreground Elements",
139
  show_label=True,
140
  container=True
 
143
  prompt2 = gr.Dropdown(
144
  multiselect=True,
145
  allow_custom_value=True,
146
+ max_choices=3,
147
  label="Background Elements",
148
  show_label=True,
149
  container=True
 
161
  prompt4 = gr.Dropdown(
162
  multiselect=True,
163
  allow_custom_value=True,
164
+ max_choices=4,
165
  label="Forbidden Elements/Events",
166
  show_label=True,
167
  container=True