amandakonet commited on
Commit
9cc1a37
1 Parent(s): ada62bf
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -4,6 +4,9 @@ import pandas as pd
4
  from PIL import Image
5
  import os
6
 
 
 
 
7
  # title
8
  st.title('Combatting Climate Change Misinformation with Transformers')
9
 
@@ -86,13 +89,10 @@ st.markdown("For this project, I fine-tune ClimateBERT (4) on the text entailmen
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")
@@ -106,7 +106,7 @@ st.markdown("In the complete pipeline (from user input to final output), we coul
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)")
110
  st.markdown("1. https://www.carbonbrief.org/guest-post-how-climate-change-misinformation-spreads-online")
111
  st.markdown("2. https://www.brookings.edu/research/how-to-combat-fake-news-and-disinformation/")
112
  st.markdown("3. Climate FEVER [paper](https://arxiv.org/abs/2012.00614), [huggingface repo](https://huggingface.co/datasets/climate_fever), and [github](https://github.com/huggingface/datasets/tree/master/datasets/climate_fever)")
 
4
  from PIL import Image
5
  import os
6
 
7
+ # read in example
8
+ df = pd.read_csv('example_claim_evidence_pairs.csv')
9
+
10
  # title
11
  st.title('Combatting Climate Change Misinformation with Transformers')
12
 
 
89
 
90
  st.markdown("## Try it out!")
91
  txt_class = pipeline('text-classification', model='amandakonet/climatebert-fact-checking', use_auth_token = os.environ["hf_token"])
92
+ option = st.selectbox('Select a climate claim to test', df['claim'].unique())
 
 
 
 
93
 
94
  st.write('You selected:', option)
95
+ st.write(type(option))
96
 
97
  # section 6: analysis
98
  st.markdown("## Critical Analysis")
 
106
  st.markdown("## Resource Links")
107
 
108
  st.markdown("### References")
109
+ st.markdown("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)")
110
  st.markdown("1. https://www.carbonbrief.org/guest-post-how-climate-change-misinformation-spreads-online")
111
  st.markdown("2. https://www.brookings.edu/research/how-to-combat-fake-news-and-disinformation/")
112
  st.markdown("3. Climate FEVER [paper](https://arxiv.org/abs/2012.00614), [huggingface repo](https://huggingface.co/datasets/climate_fever), and [github](https://github.com/huggingface/datasets/tree/master/datasets/climate_fever)")