Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -49,10 +49,10 @@ 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 |
-
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
|
58 |
response = requests.get(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.offset()
|
56 |
|
57 |
# Send a GET request to the URL
|
58 |
response = requests.get(url)
|