rexarski commited on
Commit
3148527
1 Parent(s): 08a14f0

[FIX] add key in st.radio to prevent DuplicateWidgetID error

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -134,7 +134,7 @@ df2 = pd.DataFrame(data2)
134
 
135
  st.markdown(
136
  """
137
- # climate-plus demo
138
  This is a minimal example of two models we trained for `climate-plus` project:
139
 
140
  - [bert-base-climate-fever-fixed](https://huggingface.co/rexarski/bert-base-climate-fever-fixed)
@@ -144,11 +144,12 @@ See the [GitHub repo](https://github.com/rexarski/climate-plus) for more details
144
  """
145
  )
146
 
147
- st.markdown("## Factchecking")
148
 
149
  factchecking_demo = st.radio(
150
  "What examples do you want to see?",
151
  ("Preloaded examples", "Custom examples"),
 
152
  )
153
 
154
  if factchecking_demo == "Preloaded examples":
@@ -180,11 +181,12 @@ else:
180
 
181
  st.markdown("---")
182
 
183
- st.markdown("## TCFD disclosure classification")
184
 
185
  tcfd_demo = st.radio(
186
  "What examples do you want to see?",
187
  ("Preloaded examples", "Custom examples"),
 
188
  )
189
 
190
  if tcfd_demo == "Preloaded examples":
@@ -209,4 +211,3 @@ else:
209
  custom_text = st.text_input(label="Enter your text.")
210
  if custom_text != "":
211
  st.markdown(f"**Prediction**: {tcfd_classify(custom_text)}")
212
-
 
134
 
135
  st.markdown(
136
  """
137
+ # climate-plus demo 🌦️
138
  This is a minimal example of two models we trained for `climate-plus` project:
139
 
140
  - [bert-base-climate-fever-fixed](https://huggingface.co/rexarski/bert-base-climate-fever-fixed)
 
144
  """
145
  )
146
 
147
+ st.markdown("## Factchecking 🌤️")
148
 
149
  factchecking_demo = st.radio(
150
  "What examples do you want to see?",
151
  ("Preloaded examples", "Custom examples"),
152
+ key="factchecking_demo",
153
  )
154
 
155
  if factchecking_demo == "Preloaded examples":
 
181
 
182
  st.markdown("---")
183
 
184
+ st.markdown("## TCFD disclosure classification ⛈️")
185
 
186
  tcfd_demo = st.radio(
187
  "What examples do you want to see?",
188
  ("Preloaded examples", "Custom examples"),
189
+ key="tcfd_demo",
190
  )
191
 
192
  if tcfd_demo == "Preloaded examples":
 
211
  custom_text = st.text_input(label="Enter your text.")
212
  if custom_text != "":
213
  st.markdown(f"**Prediction**: {tcfd_classify(custom_text)}")