srisweet commited on
Commit
8f2b799
β€’
1 Parent(s): a11a94d

Used Caps for textbox labels

Browse files
Files changed (1) hide show
  1. image2text.py +5 -8
image2text.py CHANGED
@@ -16,19 +16,16 @@ def app():
16
  st.markdown(
17
  """
18
 
19
- ### πŸ‘‹ Ciao!
20
-
21
- Here you can find the captions or the labels that are most related to a given image.
22
- 🀌 Italian mode on! 🀌
23
 
24
- For example, try to write "gatto" (cat) in the space for label1 and "cane" (dog) in the space for label2 and the run
25
  "classify"!
26
 
27
  """
28
  )
29
 
30
  image_url = st.text_input(
31
- "You can input the URL of an image",
32
  value="https://www.petdetective.it/wp-content/uploads/2016/04/gatto-toilette.jpg",
33
  )
34
 
@@ -38,14 +35,14 @@ def app():
38
 
39
  with col2:
40
  captions_count = st.selectbox(
41
- "Number of labels", options=range(1, MAX_CAP + 1), index=1
42
  )
43
  compute = st.button("Classify")
44
 
45
  with col1:
46
  captions = list()
47
  for idx in range(min(MAX_CAP, captions_count)):
48
- captions.append(st.text_input(f"Insert label {idx+1}"))
49
 
50
  if compute:
51
  captions = [c for c in captions if c != ""]
 
16
  st.markdown(
17
  """
18
 
19
+ πŸ‘‹ Ciao! Here you can find the captions or the labels that are most related to a given image.
 
 
 
20
 
21
+ Try typing "gatto" (cat) in the space for label1 and "cane" (dog) in the space for label2 and click
22
  "classify"!
23
 
24
  """
25
  )
26
 
27
  image_url = st.text_input(
28
+ "YOU CAN INPUT THE URL OF AN IMAGE : ",
29
  value="https://www.petdetective.it/wp-content/uploads/2016/04/gatto-toilette.jpg",
30
  )
31
 
 
35
 
36
  with col2:
37
  captions_count = st.selectbox(
38
+ "NUMBER OF LABELS", options=range(1, MAX_CAP + 1), index=1
39
  )
40
  compute = st.button("Classify")
41
 
42
  with col1:
43
  captions = list()
44
  for idx in range(min(MAX_CAP, captions_count)):
45
+ captions.append(st.text_input(f"INSERT LABEL {idx+1}"))
46
 
47
  if compute:
48
  captions = [c for c in captions if c != ""]