TheLitttleThings commited on
Commit
9dbff11
1 Parent(s): 62a2600

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -193,14 +193,14 @@ a.link{
193
  _, left, right, _ = mainContain.columns((1, 2, 4, 1))
194
  img = load_image(image_file)
195
  left.image(img)
196
- left.text("It'll take about 30s to load all new images")
197
  results = image_comparison(img)
198
  right.markdown(get_html(results, "small"), unsafe_allow_html=True)
199
 
200
  image_embedding = image_query_embedding(img)
201
  values, indices = most_similars(image_embedding, text_embeddings)
202
  for i, sim in zip(indices, torch.softmax(values, dim=0)):
203
- left.text(f'{round(float(sim * 100), 1)} | {categories[i]}')
204
 
205
 
206
  if __name__ == '__main__':
193
  _, left, right, _ = mainContain.columns((1, 2, 4, 1))
194
  img = load_image(image_file)
195
  left.image(img)
196
+ left.markdown("It'll take about 30s to load all new images")
197
  results = image_comparison(img)
198
  right.markdown(get_html(results, "small"), unsafe_allow_html=True)
199
 
200
  image_embedding = image_query_embedding(img)
201
  values, indices = most_similars(image_embedding, text_embeddings)
202
  for i, sim in zip(indices, torch.softmax(values, dim=0)):
203
+ left.markdown(f'{round(float(sim * 100), 1)} | {categories[i]}')
204
 
205
 
206
  if __name__ == '__main__':