thak123 commited on
Commit
9162278
·
1 Parent(s): e95dd79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -49,7 +49,9 @@ def get_definition_and_image(word):
49
  # URL for the ImageNet API
50
  base_url = "http://www.image-net.org/api/text/imagenet.synset.geturls?wnid="
51
 
52
- # Cofrom PIL import Image mbine the base URL and the synset ID to get a list of image URLs
 
 
53
  url = base_url + synset_id
54
 
55
  # Send a GET request to the URL
 
49
  # URL for the ImageNet API
50
  base_url = "http://www.image-net.org/api/text/imagenet.synset.geturls?wnid="
51
 
52
+ if not synset_id: return None,None
53
+
54
+ # Cofrom PIL import Image mbine the base URL and the synset ID to get a list of image URLs
55
  url = base_url + synset_id
56
 
57
  # Send a GET request to the URL