bgaspra commited on
Commit
6ef5a6e
·
verified ·
1 Parent(s): 7bfd199

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 = 100
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(), # Use Textbox for better text display
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(share=True)
 
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()