sashavor commited on
Commit
2525c50
1 Parent(s): b562329

adding text

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,14 +31,14 @@ def query(image, top_k=4):
31
  labels_with_probs = {k: 1- v for k, v in labels_with_probs.items()}
32
  try:
33
  description = wikipedia.summary(captions[0], sentences = 1)
34
- description = "## " + description
35
  url = wikipedia.page(captions[0]).url
36
  url = " You can learn more about your slug [here](" + str(url) + ")!"
37
  description = description + url
38
  except:
39
- description = "## Sea slugs, or Nudibranchs, are marine invertebrates that often live in reefs underwater. They have an enormous variation in body shape, color, and size."
40
  url = "https://en.wikipedia.org/wiki/Sea_slug"
41
- url = " You can learn more about your slug [here](" + str(url) + ")!"
42
  description = description + url
43
  return images_with_captions, labels_with_probs, description
44
 
 
31
  labels_with_probs = {k: 1- v for k, v in labels_with_probs.items()}
32
  try:
33
  description = wikipedia.summary(captions[0], sentences = 1)
34
+ description = "### " + description
35
  url = wikipedia.page(captions[0]).url
36
  url = " You can learn more about your slug [here](" + str(url) + ")!"
37
  description = description + url
38
  except:
39
+ description = "### Sea slugs, or Nudibranchs, are marine invertebrates that often live in reefs underwater. They have an enormous variation in body shape, color, and size."
40
  url = "https://en.wikipedia.org/wiki/Sea_slug"
41
+ url = " You can learn more about sea slugs [here](" + str(url) + ")!"
42
  description = description + url
43
  return images_with_captions, labels_with_probs, description
44