Spaces:
Runtime error
Runtime error
amandakonet
commited on
Commit
β’
ada62bf
1
Parent(s):
f61c39a
update
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ st.markdown("* FEVER, or Fact Extraction and VERification, was introduced in 201
|
|
54 |
st.markdown("* Since then, other researchers have expanded on this area in different domains")
|
55 |
st.markdown("* Here, we use Climate FEVER (3), a similar dataset developed and annotated by ")
|
56 |
|
57 |
-
st.markdown("**Fact Verification / Fact-Checking")
|
58 |
st.markdown("* This is simply an extenstion of the textual entailment task")
|
59 |
st.markdown("* Given two sentences, sent1 and sent2, determine the relationship: entail, contradict, neutral")
|
60 |
st.markdown("* With fact verification, we can think of the sentences as claim and evidence and labels as support, refute, or not enough information to refute or support.")
|
@@ -68,8 +68,7 @@ st.markdown("Imagine: A person is curious about whether a claim they heard about
|
|
68 |
st.markdown("1. User inputs a climate claim")
|
69 |
|
70 |
st.markdown("2. Retrieve evidence related to input claim \
|
71 |
-
- For each claim, collect N related documents. These documents are selected by finding the N documents with the highest similarity scores to the claim.")
|
72 |
-
st.markdown("- Current area of research: How do we keep the set of curated documents up-to-date? Validate their contents?")
|
73 |
|
74 |
st.markdown("3. Send (claim, evidence) pairs to a transformer model. Have the model predict whether each evidence supports, refutes, or is not relevant to the claim. (π YOU ARE HERE!)")
|
75 |
|
@@ -87,9 +86,13 @@ st.markdown("For this project, I fine-tune ClimateBERT (4) on the text entailmen
|
|
87 |
|
88 |
st.markdown("## Try it out!")
|
89 |
txt_class = pipeline('text-classification', model='amandakonet/climatebert-fact-checking', use_auth_token = os.environ["hf_token"])
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
92 |
|
|
|
93 |
|
94 |
# section 6: analysis
|
95 |
st.markdown("## Critical Analysis")
|
@@ -101,11 +104,6 @@ st.markdown("In the complete pipeline (from user input to final output), we coul
|
|
101 |
|
102 |
# References + Resource Links
|
103 |
st.markdown("## Resource Links")
|
104 |
-
# climatefever paper
|
105 |
-
# feverpaper
|
106 |
-
# fact checking covid paper
|
107 |
-
# models
|
108 |
-
# nli fine-tuning notebook
|
109 |
|
110 |
st.markdown("### References")
|
111 |
st.markdonw("My [huggingface model card](https://huggingface.co/amandakonet/climatebert-fact-checking), [adopted Climate FEVER dataset card](https://huggingface.co/datasets/amandakonet/climate_fever_adopted), and [project code on github](https://github.com/amandakonet/climate-change-misinformation)")
|
|
|
54 |
st.markdown("* Since then, other researchers have expanded on this area in different domains")
|
55 |
st.markdown("* Here, we use Climate FEVER (3), a similar dataset developed and annotated by ")
|
56 |
|
57 |
+
st.markdown("**Fact Verification / Fact-Checking**")
|
58 |
st.markdown("* This is simply an extenstion of the textual entailment task")
|
59 |
st.markdown("* Given two sentences, sent1 and sent2, determine the relationship: entail, contradict, neutral")
|
60 |
st.markdown("* With fact verification, we can think of the sentences as claim and evidence and labels as support, refute, or not enough information to refute or support.")
|
|
|
68 |
st.markdown("1. User inputs a climate claim")
|
69 |
|
70 |
st.markdown("2. Retrieve evidence related to input claim \
|
71 |
+
- For each claim, collect N related documents. These documents are selected by finding the N documents with the highest similarity scores to the claim. A current area of research: How do we keep the set of curated documents up-to-date? Validate their contents?")
|
|
|
72 |
|
73 |
st.markdown("3. Send (claim, evidence) pairs to a transformer model. Have the model predict whether each evidence supports, refutes, or is not relevant to the claim. (π YOU ARE HERE!)")
|
74 |
|
|
|
86 |
|
87 |
st.markdown("## Try it out!")
|
88 |
txt_class = pipeline('text-classification', model='amandakonet/climatebert-fact-checking', use_auth_token = os.environ["hf_token"])
|
89 |
+
option = st.selectbox('Select a climate claim to test',
|
90 |
+
("It is increasingly clear that the planet was significantly warmer than today several times during the past 10,000 years"
|
91 |
+
"Temperature records have been adjusted in recent years to make the past appear cooler and the present warmer, although the Carbon Brief showed that NOAA has actually made the past warmer, evening out the difference.",
|
92 |
+
"Eleven percent of all global greenhouse gas emissions caused by humans are caused by deforestation β comparable to the emissions from all of the cars and trucks on the planet.",
|
93 |
+
"We donβt expect record years every year, but the ongoing long-term warming trend is clear."))
|
94 |
|
95 |
+
st.write('You selected:', option)
|
96 |
|
97 |
# section 6: analysis
|
98 |
st.markdown("## Critical Analysis")
|
|
|
104 |
|
105 |
# References + Resource Links
|
106 |
st.markdown("## Resource Links")
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
st.markdown("### References")
|
109 |
st.markdonw("My [huggingface model card](https://huggingface.co/amandakonet/climatebert-fact-checking), [adopted Climate FEVER dataset card](https://huggingface.co/datasets/amandakonet/climate_fever_adopted), and [project code on github](https://github.com/amandakonet/climate-change-misinformation)")
|