Omnibus commited on
Commit
e5862c2
1 Parent(s): a7b60fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -33,13 +33,13 @@ def make_files(t_name,t_space,t_title,t_description,t_redirect,t_image=None,t_im
33
  img1.thumbnail((500,500), Image.Resampling.LANCZOS)
34
  img1.save(f'tmpim-{uid}.png')
35
  output_pro=cv2.imread(f'tmpim-{uid}.png')
36
- output_pro2=cv2.imread(f'tmpim2-{uid}.png')
 
37
 
38
  cv2.imwrite("card_im.png",output_pro)
39
- cv2.imwrite("card_im_crop.png",output_pro2)
40
  files.append("card_im.png")
41
  files.append("card_im_crop.png")
42
- t_image2=t_image.crop((0,140,500,140))
43
  print(f"Using image URL {t_image}")
44
  pass
45
 
@@ -65,13 +65,13 @@ def make_files(t_name,t_space,t_title,t_description,t_redirect,t_image=None,t_im
65
  img1.thumbnail((500,500), Image.Resampling.LANCZOS)
66
  img1.save(f'tmpim-{uid}.png')
67
  output_pro=cv2.imread(f'tmpim-{uid}.png')
68
- output_pro2=cv2.imread(f'tmpim2-{uid}.png')
 
69
 
70
  cv2.imwrite("card_im.png",output_pro)
71
- cv2.imwrite("card_im_crop.png",output_pro2)
72
  files.append("card_im.png")
73
  files.append("card_im_crop.png")
74
- t_image2=t_image.crop((0,140,500,140))
75
  pass
76
 
77
  try:
 
33
  img1.thumbnail((500,500), Image.Resampling.LANCZOS)
34
  img1.save(f'tmpim-{uid}.png')
35
  output_pro=cv2.imread(f'tmpim-{uid}.png')
36
+ #output_pro2=cv2.imread(f'tmpim2-{uid}.png')
37
+ t_image2=output_pro.crop((0,140,500,140))
38
 
39
  cv2.imwrite("card_im.png",output_pro)
40
+ cv2.imwrite("card_im_crop.png",t_image2)
41
  files.append("card_im.png")
42
  files.append("card_im_crop.png")
 
43
  print(f"Using image URL {t_image}")
44
  pass
45
 
 
65
  img1.thumbnail((500,500), Image.Resampling.LANCZOS)
66
  img1.save(f'tmpim-{uid}.png')
67
  output_pro=cv2.imread(f'tmpim-{uid}.png')
68
+ #output_pro2=cv2.imread(f'tmpim2-{uid}.png')
69
+ t_image2=output_pro.crop((0,140,500,140))
70
 
71
  cv2.imwrite("card_im.png",output_pro)
72
+ cv2.imwrite("card_im_crop.png",t_image2)
73
  files.append("card_im.png")
74
  files.append("card_im_crop.png")
 
75
  pass
76
 
77
  try: