BennoKrojer commited on
Commit
4d39816
·
1 Parent(s): d30d4ce
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -8,7 +8,7 @@ import random
8
  import io
9
 
10
  st.set_page_config(layout="wide")
11
- st.markdown("This is a demo of the *ImageCoDe* dataset. Sample an example description with the left +/- button on the right and compare all the images with the +/- button on the right. If you want to know the groundtruth solution, scroll down to the end of the page!")
12
 
13
  col1, col2 = st.columns(2)
14
 
@@ -32,7 +32,7 @@ images = [prefix+'/'+img_set+'/'+i for i in set2ids[img_set]]
32
  img_urls = images.copy()
33
  index = int(col2.number_input('Image Index from 0 to 9', value=0, min_value=0, max_value=len(images)-1))
34
 
35
- col1.caption(f'Description: {descr}')
36
 
37
  img = images[index]
38
  images[index] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index], stream=True).content)),border=20,fill='blue')
@@ -43,4 +43,5 @@ cap = str(index)
43
  col1.image(img, use_column_width=True, caption=cap)
44
  col2.image(images, width=175, caption=caps)
45
 
46
- st.markdown('#')
 
 
8
  import io
9
 
10
  st.set_page_config(layout="wide")
11
+ st.markdown("**This is a demo of the *ImageCoDe* dataset. Sample an example description with the left +/- button on the right and compare all the images with the +/- button on the right. If you want to know the groundtruth solution, scroll down to the end of the page!**")
12
 
13
  col1, col2 = st.columns(2)
14
 
 
32
  img_urls = images.copy()
33
  index = int(col2.number_input('Image Index from 0 to 9', value=0, min_value=0, max_value=len(images)-1))
34
 
35
+ col1.markdown(f'**Description**: \n{descr}')
36
 
37
  img = images[index]
38
  images[index] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index], stream=True).content)),border=20,fill='blue')
 
43
  col1.image(img, use_column_width=True, caption=cap)
44
  col2.image(images, width=175, caption=caps)
45
 
46
+ st.markdown('#')
47
+ st.markdown(f'**Groundtruth solution:{idx}**')