Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -163,7 +163,10 @@ print('Loading Finished!')
|
|
163 |
def check_input_image(input_image):
|
164 |
if input_image is None:
|
165 |
raise gr.Error("No image uploaded!")
|
166 |
-
|
|
|
|
|
|
|
167 |
|
168 |
def preprocess(input_image, do_remove_background):
|
169 |
|
@@ -1082,9 +1085,9 @@ def create_ui():
|
|
1082 |
|
1083 |
mv_images = gr.State()
|
1084 |
|
1085 |
-
submit.click(fn=check_input_image, inputs=[new_crop_save_path]).success(
|
1086 |
fn=generate_mvs,
|
1087 |
-
inputs=[
|
1088 |
outputs=[mv_images, mv_show_images]
|
1089 |
|
1090 |
).success(
|
|
|
163 |
def check_input_image(input_image):
|
164 |
if input_image is None:
|
165 |
raise gr.Error("No image uploaded!")
|
166 |
+
return None
|
167 |
+
else:
|
168 |
+
image = Image.open(input_image)
|
169 |
+
return image
|
170 |
|
171 |
def preprocess(input_image, do_remove_background):
|
172 |
|
|
|
1085 |
|
1086 |
mv_images = gr.State()
|
1087 |
|
1088 |
+
submit.click(fn=check_input_image, inputs=[new_crop_save_path], outputs=[process_images]).success(
|
1089 |
fn=generate_mvs,
|
1090 |
+
inputs=[process_images, sample_steps, sample_seed],
|
1091 |
outputs=[mv_images, mv_show_images]
|
1092 |
|
1093 |
).success(
|