Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ import matplotlib.pyplot as plt
|
|
16 |
dataset = load_dataset("thefcraft/civitai-stable-diffusion-337k")
|
17 |
|
18 |
# Take a subset of the dataset
|
19 |
-
subset_size =
|
20 |
dataset_subset = dataset['train'].shuffle(seed=42).select(range(subset_size))
|
21 |
|
22 |
# Directory to save images
|
@@ -145,9 +145,9 @@ def display_images(image_paths, model_names, distances):
|
|
145 |
interface = gr.Interface(
|
146 |
fn=recommend,
|
147 |
inputs=gr.Image(type="pil"),
|
148 |
-
outputs=gr.Textbox(),
|
149 |
title="Image Recommendation System",
|
150 |
description="Upload an image and get 5 recommended similar images with model names and distances."
|
151 |
)
|
152 |
|
153 |
-
interface.launch(
|
|
|
16 |
dataset = load_dataset("thefcraft/civitai-stable-diffusion-337k")
|
17 |
|
18 |
# Take a subset of the dataset
|
19 |
+
subset_size = 50
|
20 |
dataset_subset = dataset['train'].shuffle(seed=42).select(range(subset_size))
|
21 |
|
22 |
# Directory to save images
|
|
|
145 |
interface = gr.Interface(
|
146 |
fn=recommend,
|
147 |
inputs=gr.Image(type="pil"),
|
148 |
+
outputs=gr.Textbox(),
|
149 |
title="Image Recommendation System",
|
150 |
description="Upload an image and get 5 recommended similar images with model names and distances."
|
151 |
)
|
152 |
|
153 |
+
interface.launch()
|