wcy1122 commited on
Commit
528ddd1
1 Parent(s): 24685b1

update condition

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -211,7 +211,13 @@ def add_text(state, imagebox, textbox, image_process_mode, gen_image):
211
  if imagebox is not None:
212
  textbox = DEFAULT_IMAGE_TOKEN + '\n' + textbox
213
  image = Image.open(imagebox).convert('RGB')
214
-
 
 
 
 
 
 
215
  if gen_image == 'Yes':
216
  textbox = textbox + ' <GEN>'
217
 
 
211
  if imagebox is not None:
212
  textbox = DEFAULT_IMAGE_TOKEN + '\n' + textbox
213
  image = Image.open(imagebox).convert('RGB')
214
+
215
+ if 'generate' in textbox.lower():
216
+ gen_image = 'Yes'
217
+ elif 'show me one idea of what i could make with this?' in textbox.lower() and imagebox is not None:
218
+ h, w = image.size
219
+ if h == 922 and w == 672:
220
+ gen_image = 'Yes'
221
  if gen_image == 'Yes':
222
  textbox = textbox + ' <GEN>'
223