Spaces:
Runtime error
Runtime error
BennoKrojer
commited on
Commit
•
e11f74d
1
Parent(s):
417eb6c
app.py
CHANGED
@@ -28,10 +28,10 @@ col1.subheader(descr)
|
|
28 |
sample_button = col1.button('Sample set of images with contextual description')
|
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 |
|
|
|
28 |
sample_button = col1.button('Sample set of images with contextual description')
|
29 |
|
30 |
if sample_button:
|
|
|
|
|
31 |
img_set = random.sample(list(set2ids.keys()),1)[0]
|
32 |
descr = random.sample(list(descriptions[img_set].values()),1)[0]
|
33 |
+
index= 0
|
34 |
+
images = [prefix+'/'+img_set+'/'+i for i in set2ids[img_set]]
|
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 |
|