tripleS-Dev commited on
Commit
7841a2b
·
1 Parent(s): 76f5da6

update V1.3.4L Beta

Browse files
Files changed (2) hide show
  1. generate.py +4 -1
  2. main.py +1 -1
generate.py CHANGED
@@ -18,7 +18,7 @@ side_special = Image.open("resources/side_special.png")
18
  side_oma1 = Image.open("resources/side_oma1.png")
19
  side_oma2 = Image.open("resources/side_oma2.png")
20
 
21
- def sorting(img_type, img_static, img_dynamic_file, obj_color, obj_color_picker, ai_num, txt_color, txt_color_picker, member_name_dropdown, group_name_radio, group_name_txt, obj_num, obj_alphabet, obj_alphabet_txt, obj_serial):
22
 
23
  if not img_static.size == (1164, 1800):
24
  img_static = edimg.resize_img(img_static, 1164, 1800)
@@ -31,6 +31,9 @@ def sorting(img_type, img_static, img_dynamic_file, obj_color, obj_color_picker,
31
  gr.Warning("Upload the image first")
32
  return "resource/upload_first.png", "resource/upload_first.png", None
33
  img = front_static(img_static, obj_color, obj_color_picker, ai_num, txt_color, txt_color_picker, member_name_dropdown, group_name_radio, group_name_txt, obj_num, obj_alphabet, obj_alphabet_txt, obj_serial)
 
 
 
34
  return img, img, None
35
  case "Gif":
36
  if img_dynamic_file == None:
 
18
  side_oma1 = Image.open("resources/side_oma1.png")
19
  side_oma2 = Image.open("resources/side_oma2.png")
20
 
21
+ def sorting(img_type, img_static, img_dynamic_file, obj_color, obj_color_picker, ai_num, txt_color, txt_color_picker, member_name_dropdown, group_name_radio, group_name_txt, obj_num, obj_alphabet, obj_alphabet_txt, obj_serial, horizontal):
22
 
23
  if not img_static.size == (1164, 1800):
24
  img_static = edimg.resize_img(img_static, 1164, 1800)
 
31
  gr.Warning("Upload the image first")
32
  return "resource/upload_first.png", "resource/upload_first.png", None
33
  img = front_static(img_static, obj_color, obj_color_picker, ai_num, txt_color, txt_color_picker, member_name_dropdown, group_name_radio, group_name_txt, obj_num, obj_alphabet, obj_alphabet_txt, obj_serial)
34
+ if horizontal:
35
+ img_rotate = img.rotate(90, expand=True)
36
+ return img_rotate, img, None
37
  return img, img, None
38
  case "Gif":
39
  if img_dynamic_file == None:
main.py CHANGED
@@ -300,7 +300,7 @@ with gr.Blocks(theme=theme) as demo: # , js=js_func
300
  generate_btn.click(fn=generate.sorting,
301
  inputs=[img_type, img_static, img_dynamic_file, obj_color, obj_color_picker, ai_num, txt_color,
302
  txt_color_picker, member_name_dropdown, group_name_radio, group_name_txt, obj_num,
303
- obj_alphabet, obj_alphabet_txt, obj_serial], outputs=[edited_img, ex_img_f, ex_file_f])
304
 
305
  ex_gen_file_count.change(fns.ex_gen_count, ex_gen_file_count, ex_img_b_out)
306
 
 
300
  generate_btn.click(fn=generate.sorting,
301
  inputs=[img_type, img_static, img_dynamic_file, obj_color, obj_color_picker, ai_num, txt_color,
302
  txt_color_picker, member_name_dropdown, group_name_radio, group_name_txt, obj_num,
303
+ obj_alphabet, obj_alphabet_txt, obj_serial, horizontal], outputs=[edited_img, ex_img_f, ex_file_f])
304
 
305
  ex_gen_file_count.change(fns.ex_gen_count, ex_gen_file_count, ex_img_b_out)
306