Fixed problem
Browse files
app.py
CHANGED
@@ -190,12 +190,9 @@ article = (
|
|
190 |
example_folder = "examples" # Single folder for all examples
|
191 |
examples = [[f"{example_folder}/{example}"] for example in os.listdir(example_folder) if example.endswith((".png", ".jpg", ".jpeg"))]
|
192 |
|
193 |
-
#
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
# Apply the function to append the model to each example
|
198 |
-
examples_with_model = [add_model_to_example(example) for example in examples]
|
199 |
|
200 |
# Create the Gradio demo
|
201 |
demo = gr.Interface(
|
@@ -204,7 +201,7 @@ demo = gr.Interface(
|
|
204 |
gr.Image(type="pil", label="Upload an image"),
|
205 |
gr.Dropdown(
|
206 |
choices=list(models.keys()),
|
207 |
-
value=
|
208 |
label="Select Model",
|
209 |
interactive=True
|
210 |
)
|
|
|
190 |
example_folder = "examples" # Single folder for all examples
|
191 |
examples = [[f"{example_folder}/{example}"] for example in os.listdir(example_folder) if example.endswith((".png", ".jpg", ".jpeg"))]
|
192 |
|
193 |
+
# For the list of examples, add the model name
|
194 |
+
for example in examples:
|
195 |
+
example.append(default_model)
|
|
|
|
|
|
|
196 |
|
197 |
# Create the Gradio demo
|
198 |
demo = gr.Interface(
|
|
|
201 |
gr.Image(type="pil", label="Upload an image"),
|
202 |
gr.Dropdown(
|
203 |
choices=list(models.keys()),
|
204 |
+
value=default_model,
|
205 |
label="Select Model",
|
206 |
interactive=True
|
207 |
)
|