amandakonet commited on
Commit
3f86dc6
1 Parent(s): 85200e9

model output

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -180,14 +180,12 @@ st.markdown("## Try it out!")
180
 
181
  # select climate claim
182
  option_claim = st.selectbox('Select a climate claim to test', ex_df['claim'].unique())
183
- st.write('You selected:', option_claim)
184
 
185
  # filter df to selected claim
186
  filtered_df = ex_df[ex_df['claim'] == option_claim]
187
 
188
  # select evidence
189
  option_evidence = st.selectbox('Select evidence to test', filtered_df['evidence'].unique())
190
- st.write('You selected:', option_evidence)
191
 
192
  st.markdown("Now, we can use your selected (claim, evidence) pair in the fine-tuned transformer!")
193
 
@@ -213,7 +211,7 @@ with torch.no_grad():
213
  pred_label = 'refutes'
214
 
215
  # write out
216
- st.write("**is**", labels[0])
217
  st.write("**with**", option_evidence)
218
 
219
  # clean up true label
@@ -224,7 +222,7 @@ with torch.no_grad():
224
  true_label = "supports"
225
  else:
226
  true_label == "refutes"
227
-
228
  st.write("**The correct relationship is**", true_label)
229
 
230
  # section 6: analysis
@@ -232,7 +230,7 @@ st.markdown("## Critical Analysis")
232
  st.markdown("What else could we do?")
233
  st.markdown("* Given more data, the performance of the model can be greatly improved. This is just a proof of concept")
234
  st.markdown("* This is only one small part of the puzzle!")
235
- st.markdown("In the complete pipeline (from user input to final output), we could move from just outputting evidence to training a transformer to reply with persuasive evidence. That is, instead of simply saying, \"This claim is supported by this evidence\", the model could transform the evidence into a persuasive argument, thus combatting climate change misinfo in a more platable and convincing way.")
236
 
237
 
238
  # References + Resource Links
 
180
 
181
  # select climate claim
182
  option_claim = st.selectbox('Select a climate claim to test', ex_df['claim'].unique())
 
183
 
184
  # filter df to selected claim
185
  filtered_df = ex_df[ex_df['claim'] == option_claim]
186
 
187
  # select evidence
188
  option_evidence = st.selectbox('Select evidence to test', filtered_df['evidence'].unique())
 
189
 
190
  st.markdown("Now, we can use your selected (claim, evidence) pair in the fine-tuned transformer!")
191
 
 
211
  pred_label = 'refutes'
212
 
213
  # write out
214
+ st.write("**is**", pred_label)
215
  st.write("**with**", option_evidence)
216
 
217
  # clean up true label
 
222
  true_label = "supports"
223
  else:
224
  true_label == "refutes"
225
+
226
  st.write("**The correct relationship is**", true_label)
227
 
228
  # section 6: analysis
 
230
  st.markdown("What else could we do?")
231
  st.markdown("* Given more data, the performance of the model can be greatly improved. This is just a proof of concept")
232
  st.markdown("* This is only one small part of the puzzle!")
233
+ st.markdown("* In the complete pipeline (from user input to final output), we could move from just outputting evidence to training a transformer to reply with persuasive evidence. That is, instead of simply saying, \"This claim is supported by this evidence\", the model could transform the evidence into a persuasive argument, thus combatting climate change misinfo in a more platable and convincing way.")
234
 
235
 
236
  # References + Resource Links