markytools commited on
Commit
77ae6a6
·
1 Parent(s): 6ccedcd

updated app

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -167,16 +167,25 @@ if opt.blackbg:
167
  # x = st.slider('Select a value')
168
  # st.write(x, 'squared is', x * x)
169
 
 
 
170
  image = Image.open('demo_image/demo_ballys.jpg') #Brand logo image (optional)
 
 
 
171
  #Create two columns with different width
172
  col1, col2 = st.columns( [0.8, 0.2])
173
  with col1: # To display the header text using css style
174
  st.markdown(""" <style> .font {
175
  font-size:35px ; font-family: 'Cooper Black'; color: #FF9633;}
176
  </style> """, unsafe_allow_html=True)
177
- st.markdown('<p class="font">Upload your photo here...</p>', unsafe_allow_html=True)
178
  with col2: # To display brand logo
179
  st.image(image, width=150)
 
 
 
 
180
 
181
  uploaded_file = st.file_uploader("Choose a file", type=["png", "jpg"])
182
  if uploaded_file is not None:
@@ -199,7 +208,6 @@ if uploaded_file is not None:
199
  results_dict = {}
200
  aveAttr = []
201
  aveAttr_charContrib = []
202
- target = converter.encode([labels])
203
 
204
  # labels: RONALDO
205
  segmDataNP = segmOutput
 
167
  # x = st.slider('Select a value')
168
  # st.write(x, 'squared is', x * x)
169
 
170
+ labels = st.text_input('Ground truth text', 'BALLYS')
171
+
172
  image = Image.open('demo_image/demo_ballys.jpg') #Brand logo image (optional)
173
+ image2 = Image.open('demo_image/demo_ronaldo.jpg') #Brand logo image (optional)
174
+ image3 = Image.open('demo_image/demo_shakeshack.jpg') #Brand logo image (optional)
175
+ image4 = Image.open('demo_image/demo_university.jpg') #Brand logo image (optional)
176
  #Create two columns with different width
177
  col1, col2 = st.columns( [0.8, 0.2])
178
  with col1: # To display the header text using css style
179
  st.markdown(""" <style> .font {
180
  font-size:35px ; font-family: 'Cooper Black'; color: #FF9633;}
181
  </style> """, unsafe_allow_html=True)
182
+ st.markdown('<p class="font">STRExp (Explaining PARSeq STR Model)...</p>', unsafe_allow_html=True)
183
  with col2: # To display brand logo
184
  st.image(image, width=150)
185
+ st.image(image2, width=150)
186
+ st.image(image3, width=150)
187
+ st.image(image4, width=150)
188
+
189
 
190
  uploaded_file = st.file_uploader("Choose a file", type=["png", "jpg"])
191
  if uploaded_file is not None:
 
208
  results_dict = {}
209
  aveAttr = []
210
  aveAttr_charContrib = []
 
211
 
212
  # labels: RONALDO
213
  segmDataNP = segmOutput