BennoKrojer commited on
Commit
db2e7bb
1 Parent(s): b912d76
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -36,13 +36,19 @@ col1.subheader(descr)
36
  img = images[index]
37
  images[index] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index], stream=True).content)),border=20,fill='blue')
38
 
39
- col1.image(img, use_column_width=True)
40
  caps = list(range(10))
41
 
42
  if show:
 
 
43
  caps[idx] = f'{idx} (GROUNDTRUTH)'
 
44
  if hide:
 
 
45
  caps[idx] = f'{idx}'
 
46
  # shown = True if len(caps[idx]) > 2 else False
47
  # if shown
 
48
  col2.image(images, width=175, caption=caps)
 
36
  img = images[index]
37
  images[index] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index], stream=True).content)),border=20,fill='blue')
38
 
 
39
  caps = list(range(10))
40
 
41
  if show:
42
+ if index == idx:
43
+ cap = f'{index} (GROUNDTRUTH)'
44
  caps[idx] = f'{idx} (GROUNDTRUTH)'
45
+ images[idx] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index], stream=True).content)),border=50,fill='green')
46
  if hide:
47
+ if index == idx:
48
+ cap = f'{index}'
49
  caps[idx] = f'{idx}'
50
+ images[idx] = Image.open(io.BytesIO(requests.get(images[index], stream=True).content))
51
  # shown = True if len(caps[idx]) > 2 else False
52
  # if shown
53
+ col1.image(img, use_column_width=True, caption=cap)
54
  col2.image(images, width=175, caption=caps)