Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -160,18 +160,18 @@ with gr.Blocks() as demo:
|
|
160 |
|
161 |
#-----------------------------------------
|
162 |
# Added 2 examples for this deployment only
|
163 |
-
examples_list = ["image_examples/image1.png", "image_examples/image2.png"]
|
164 |
-
# same full chain of events as the file.upload() below
|
165 |
-
def process_input(file):
|
166 |
-
|
167 |
-
|
168 |
|
169 |
-
|
170 |
-
|
171 |
|
172 |
-
|
173 |
|
174 |
-
example_component = gr.Examples(examples_list, inputs=file_input, fn=process_input, outputs=[image_file, error_output, image_file, file_input])
|
175 |
#-------------------------------------------
|
176 |
file_input.upload(
|
177 |
fn=input_file_handler,
|
|
|
160 |
|
161 |
#-----------------------------------------
|
162 |
# Added 2 examples for this deployment only
|
163 |
+
# examples_list = ["image_examples/image1.png", "image_examples/image2.png"]
|
164 |
+
# # same full chain of events as the file.upload() below
|
165 |
+
# def process_input(file):
|
166 |
+
# # First, call input_file_handler
|
167 |
+
# processed_file, error = input_file_handler(file)
|
168 |
|
169 |
+
# # Then, update image visibility
|
170 |
+
# visible_image, hidden_file = update_image_visibility(processed_file)
|
171 |
|
172 |
+
# return processed_file, error, visible_image, hidden_file
|
173 |
|
174 |
+
# example_component = gr.Examples(examples_list, inputs=file_input, fn=process_input, outputs=[image_file, error_output, image_file, file_input])
|
175 |
#-------------------------------------------
|
176 |
file_input.upload(
|
177 |
fn=input_file_handler,
|