Update app.py
Browse filesChanged the default values of the input style and content image
app.py
CHANGED
@@ -98,8 +98,14 @@ example_list = [["examples/" + example] for example in os.listdir("examples")]
|
|
98 |
|
99 |
|
100 |
#Defining the predict function
|
101 |
-
def style_transfer(cont_img:Image.Image=
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
#Start the timer
|
104 |
start_time = time.time()
|
105 |
|
|
|
98 |
|
99 |
|
100 |
#Defining the predict function
|
101 |
+
def style_transfer(cont_img:Image.Image=None,styl_img:Image.Image=None) -> Image.Image:
|
102 |
+
|
103 |
+
if cont_img is None or styl_img is None:
|
104 |
+
# Handle the default behavior when inputs are not provided
|
105 |
+
# For example, you can load default images or return an error message
|
106 |
+
# Return a default output image or error message
|
107 |
+
return default_output_image
|
108 |
+
|
109 |
#Start the timer
|
110 |
start_time = time.time()
|
111 |
|