Spaces:
Runtime error
Runtime error
Commit
·
417eb6c
1
Parent(s):
d979b60
app.py
CHANGED
@@ -29,7 +29,9 @@ sample_button = col1.button('Sample set of images with contextual description')
|
|
29 |
|
30 |
if sample_button:
|
31 |
index= 0
|
|
|
32 |
img_set = random.sample(list(set2ids.keys()),1)[0]
|
|
|
33 |
img = images[index]
|
34 |
images[index] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index], stream=True).content)),border=10,fill='blue')
|
35 |
|
|
|
29 |
|
30 |
if sample_button:
|
31 |
index= 0
|
32 |
+
images = [prefix+'/'+img_set+'/'+i for i in set2ids[img_set]]
|
33 |
img_set = random.sample(list(set2ids.keys()),1)[0]
|
34 |
+
descr = random.sample(list(descriptions[img_set].values()),1)[0]
|
35 |
img = images[index]
|
36 |
images[index] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index], stream=True).content)),border=10,fill='blue')
|
37 |
|