haihuynh commited on
Commit
4e0f2a8
1 Parent(s): 7bf1cfa

Update cbir_system.py

Browse files
Files changed (1) hide show
  1. cbir_system.py +9 -9
cbir_system.py CHANGED
@@ -95,16 +95,16 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
95
 
96
  gallery = gr.Gallery(label='Retrieval Images', columns=[5], show_label=True, scale=2)
97
 
98
- # img_dir = './img_align_celeba'
99
- # examples = random.choices(img_names, k=6)
100
- # examples = [os.path.join(img_dir, ex) for ex in examples]
101
- # examples = [Image.open(img) for img in examples]
102
 
103
- # with gr.Row():
104
- # gr.Examples(
105
- # examples = examples,
106
- # inputs = image
107
- # )
108
 
109
 
110
  btn.click(image_search,
 
95
 
96
  gallery = gr.Gallery(label='Retrieval Images', columns=[5], show_label=True, scale=2)
97
 
98
+ img_dir = './img_align_celeba'
99
+ examples = random.choices(img_names, k=6)
100
+ examples = [os.path.join(img_dir, ex) for ex in examples]
101
+ examples = [Image.open(img) for img in examples]
102
 
103
+ with gr.Row():
104
+ gr.Examples(
105
+ examples = examples,
106
+ inputs = image
107
+ )
108
 
109
 
110
  btn.click(image_search,