sebastiansarasti commited on
Commit
9d3403f
1 Parent(s): a50b87e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -53,11 +53,11 @@ def interface_fn(mode, input_text, input_image, top_k):
53
  # Determinar qué input usar basado en el modo
54
  if mode == "text":
55
  if not input_text.strip():
56
- return [], "Por favor, ingresa un texto para buscar."
57
  input_data = input_text
58
  else: # mode == "image"
59
  if input_image is None:
60
- return [], "Por favor, sube una imagen para buscar."
61
  input_data = process_image_for_encoder_gradio(input_image, is_bytes=False)
62
 
63
  # Show the input data
@@ -126,8 +126,8 @@ with gr.Blocks() as demo:
126
  with gr.Row():
127
  with gr.Column(scale=1):
128
  input_text = gr.Textbox(
129
- label="Texto de búsqueda",
130
- placeholder="Ingresa aquí tu texto...",
131
  lines=3
132
  )
133
 
@@ -136,15 +136,15 @@ with gr.Blocks() as demo:
136
  maximum=20,
137
  value=5,
138
  step=1,
139
- label="Número de resultados",
140
- info="¿Cuántos resultados similares quieres ver?"
141
  )
142
 
143
- search_button = gr.Button("Buscar")
144
 
145
  with gr.Column(scale=1):
146
  output_gallery = gr.Gallery(
147
- label="Imágenes similares",
148
  columns=3,
149
  height="auto"
150
  )
 
53
  # Determinar qué input usar basado en el modo
54
  if mode == "text":
55
  if not input_text.strip():
56
+ return [], "Please, add the description of the clothes to search."
57
  input_data = input_text
58
  else: # mode == "image"
59
  if input_image is None:
60
+ return [], "Please, select an image"
61
  input_data = process_image_for_encoder_gradio(input_image, is_bytes=False)
62
 
63
  # Show the input data
 
126
  with gr.Row():
127
  with gr.Column(scale=1):
128
  input_text = gr.Textbox(
129
+ label="Search text",
130
+ placeholder="Insert your description here...",
131
  lines=3
132
  )
133
 
 
136
  maximum=20,
137
  value=5,
138
  step=1,
139
+ label="Number of images",
140
+ info="How many images do you want to see?"
141
  )
142
 
143
+ search_button = gr.Button("Search")
144
 
145
  with gr.Column(scale=1):
146
  output_gallery = gr.Gallery(
147
+ label="Similar images",
148
  columns=3,
149
  height="auto"
150
  )