Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,6 +29,8 @@ def make_files(t_name,t_space,t_title,t_description,t_redirect,t_image=None,t_im
|
|
29 |
files=[]
|
30 |
if t_image_url != None and t_image_url != "" and t_image==None:
|
31 |
t_image=t_image_url
|
|
|
|
|
32 |
print(f"Using image URL {t_image}")
|
33 |
pass
|
34 |
elif t_image != None:
|
@@ -42,11 +44,14 @@ def make_files(t_name,t_space,t_title,t_description,t_redirect,t_image=None,t_im
|
|
42 |
cv2.imwrite("card_im_crop.png",output_pro2)
|
43 |
files.append("card_im.png")
|
44 |
files.append("card_im_crop.png")
|
|
|
|
|
45 |
pass
|
46 |
|
47 |
else:
|
48 |
print("Default Image")
|
49 |
t_image="https://huggingface.co/spaces/portal/bin/resolve/main/ai_demo_card.png"
|
|
|
50 |
files.append(t_image)
|
51 |
pass
|
52 |
|
|
|
29 |
files=[]
|
30 |
if t_image_url != None and t_image_url != "" and t_image==None:
|
31 |
t_image=t_image_url
|
32 |
+
t_image2=t_image.crop((0,140,500,140))
|
33 |
+
|
34 |
print(f"Using image URL {t_image}")
|
35 |
pass
|
36 |
elif t_image != None:
|
|
|
44 |
cv2.imwrite("card_im_crop.png",output_pro2)
|
45 |
files.append("card_im.png")
|
46 |
files.append("card_im_crop.png")
|
47 |
+
t_image2=t_image.crop((0,140,500,140))
|
48 |
+
|
49 |
pass
|
50 |
|
51 |
else:
|
52 |
print("Default Image")
|
53 |
t_image="https://huggingface.co/spaces/portal/bin/resolve/main/ai_demo_card.png"
|
54 |
+
t_image2=t_image.crop((0,140,500,140))
|
55 |
files.append(t_image)
|
56 |
pass
|
57 |
|