Spaces:
Runtime error
Runtime error
[ADD] add button and separator
Browse files
app.py
CHANGED
@@ -161,9 +161,11 @@ if factchecking_demo == "Preloaded examples":
|
|
161 |
ex_claim = selected_row1["claim"].values[0]
|
162 |
ex_evidence = selected_row1["evidence"].values[0]
|
163 |
ex_label = selected_row1["label"].values[0]
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
167 |
st.markdown(f"**Claim**: {ex_claim}")
|
168 |
st.markdown(f"**Evidence**: {ex_evidence}")
|
169 |
st.markdown(f"**Label**: {ex_label}")
|
@@ -174,10 +176,11 @@ else:
|
|
174 |
st.markdown("Or enter your own claim and evidence below:")
|
175 |
custom_claim = st.text_input(label="Enter your claim.")
|
176 |
custom_evidence = st.text_input(label="Enter your evidence.")
|
177 |
-
if
|
178 |
-
|
179 |
-
|
180 |
-
|
|
|
181 |
|
182 |
st.markdown("---")
|
183 |
|
@@ -197,7 +200,8 @@ if tcfd_demo == "Preloaded examples":
|
|
197 |
|
198 |
ex_text = selected_row2["text"].values[0]
|
199 |
ex_label2 = selected_row2["label"].values[0]
|
200 |
-
|
|
|
201 |
|
202 |
st.markdown(f"**Text**: {ex_text}")
|
203 |
st.markdown(f"**Label**: {ex_label2}")
|
@@ -209,5 +213,12 @@ else:
|
|
209 |
"Or enter your own sentence to see if it belongs to any specific TCFD disclosure category:"
|
210 |
)
|
211 |
custom_text = st.text_input(label="Enter your text.")
|
212 |
-
if
|
213 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
ex_claim = selected_row1["claim"].values[0]
|
162 |
ex_evidence = selected_row1["evidence"].values[0]
|
163 |
ex_label = selected_row1["label"].values[0]
|
164 |
+
if st.button("Run"):
|
165 |
+
ex_pred = factcheck(
|
166 |
+
selected_row1["claim"].values[0],
|
167 |
+
selected_row1["evidence"].values[0],
|
168 |
+
)
|
169 |
st.markdown(f"**Claim**: {ex_claim}")
|
170 |
st.markdown(f"**Evidence**: {ex_evidence}")
|
171 |
st.markdown(f"**Label**: {ex_label}")
|
|
|
176 |
st.markdown("Or enter your own claim and evidence below:")
|
177 |
custom_claim = st.text_input(label="Enter your claim.")
|
178 |
custom_evidence = st.text_input(label="Enter your evidence.")
|
179 |
+
if st.button("Run"):
|
180 |
+
if custom_claim != "" and custom_evidence != "":
|
181 |
+
st.markdown(
|
182 |
+
f"**Prediction**: {factcheck(custom_claim, custom_evidence)}"
|
183 |
+
)
|
184 |
|
185 |
st.markdown("---")
|
186 |
|
|
|
200 |
|
201 |
ex_text = selected_row2["text"].values[0]
|
202 |
ex_label2 = selected_row2["label"].values[0]
|
203 |
+
if st.button('Run'):
|
204 |
+
ex_pred2 = tcfd_classify(selected_row2["text"].values[0])
|
205 |
|
206 |
st.markdown(f"**Text**: {ex_text}")
|
207 |
st.markdown(f"**Label**: {ex_label2}")
|
|
|
213 |
"Or enter your own sentence to see if it belongs to any specific TCFD disclosure category:"
|
214 |
)
|
215 |
custom_text = st.text_input(label="Enter your text.")
|
216 |
+
if st.button("Run"):
|
217 |
+
if custom_text != "":
|
218 |
+
st.markdown(f"**Prediction**: {tcfd_classify(custom_text)}")
|
219 |
+
|
220 |
+
st.markdown("""
|
221 |
+
---
|
222 |
+
|
223 |
+
🌦️
|
224 |
+
""")
|