Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,8 +50,16 @@ def gradio_gen_process(img,prompt,ps=0.6,style_model=None,ls=0.6,jp=None,recipie
|
|
50 |
|
51 |
#Image gen
|
52 |
print(img)
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
#Send email
|
56 |
if recipient_email:
|
57 |
send_email(file_saveloc,recipient_email,prompt=prompt)
|
@@ -59,7 +67,8 @@ def gradio_gen_process(img,prompt,ps=0.6,style_model=None,ls=0.6,jp=None,recipie
|
|
59 |
else:
|
60 |
print("Email not sent")
|
61 |
|
62 |
-
|
|
|
63 |
return img,gallery
|
64 |
|
65 |
|
|
|
50 |
|
51 |
#Image gen
|
52 |
print(img)
|
53 |
+
try:
|
54 |
+
img,file_saveloc=Gen_image(prompt,img=img,ps=ps,lr=ls,model=model,save_loc=save_loc)
|
55 |
+
gallery.append(img)
|
56 |
+
except:
|
57 |
+
recipient_email=None
|
58 |
+
print("Error:Image gen fail")
|
59 |
+
img=None
|
60 |
+
pass
|
61 |
+
|
62 |
+
|
63 |
#Send email
|
64 |
if recipient_email:
|
65 |
send_email(file_saveloc,recipient_email,prompt=prompt)
|
|
|
67 |
else:
|
68 |
print("Email not sent")
|
69 |
|
70 |
+
|
71 |
+
|
72 |
return img,gallery
|
73 |
|
74 |
|