emvecchi commited on
Commit
2a05cb2
·
verified ·
1 Parent(s): d22323b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -228,10 +228,7 @@ def display_dialogue(hf_path: str):
228
  def display_image(image_path):
229
  with hf_fs.open(image_path) as f:
230
  img = Image.open(f)
231
- st.image(img, caption='8 most contributing properties', use_column_width=True)
232
-
233
-
234
-
235
 
236
  SPEAKER_RE = re.compile(r'^\s*\*\*(T|P):\*\*\s*(.*)$')
237
 
@@ -755,7 +752,7 @@ def show_field(f: Field, index: int, data_collected):
755
  options=range(len(labels)),
756
  format_func=lambda x: labels[x],
757
  key=key,
758
- index=(value if value is not None else 0),
759
  help=f.help,
760
  horizontal=False
761
  )
@@ -800,7 +797,7 @@ def show_field(f: Field, index: int, data_collected):
800
  options=[0, 1, 2, 3, 4],
801
  format_func=lambda x: labels[x],
802
  key=key,
803
- index=(value if value is not None else 0),
804
  help=f.help,
805
  horizontal=True
806
  )
@@ -814,7 +811,7 @@ def show_field(f: Field, index: int, data_collected):
814
  options=[0, 1],
815
  format_func=lambda x: labels[x],
816
  key=key,
817
- index=(value if value is not None else 0),
818
  help=f.help,
819
  horizontal=True
820
  )
 
228
  def display_image(image_path):
229
  with hf_fs.open(image_path) as f:
230
  img = Image.open(f)
231
+ st.image(img, caption='', use_column_width=True)
 
 
 
232
 
233
  SPEAKER_RE = re.compile(r'^\s*\*\*(T|P):\*\*\s*(.*)$')
234
 
 
752
  options=range(len(labels)),
753
  format_func=lambda x: labels[x],
754
  key=key,
755
+ index=value,
756
  help=f.help,
757
  horizontal=False
758
  )
 
797
  options=[0, 1, 2, 3, 4],
798
  format_func=lambda x: labels[x],
799
  key=key,
800
+ index=value,
801
  help=f.help,
802
  horizontal=True
803
  )
 
811
  options=[0, 1],
812
  format_func=lambda x: labels[x],
813
  key=key,
814
+ index=value,
815
  help=f.help,
816
  horizontal=True
817
  )