Spaces:
Runtime error
Runtime error
amandakonet
commited on
Commit
•
9a19cd5
1
Parent(s):
b3a0ec4
ex df
Browse files
app.py
CHANGED
@@ -5,7 +5,85 @@ from PIL import Image
|
|
5 |
import os
|
6 |
|
7 |
# read in example
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# title
|
11 |
st.title('Combatting Climate Change Misinformation with Transformers')
|
|
|
5 |
import os
|
6 |
|
7 |
# read in example
|
8 |
+
ex_claims = ['Global warming is driving polar bears toward extinction',
|
9 |
+
'Global warming is driving polar bears toward extinction',
|
10 |
+
'Global warming is driving polar bears toward extinction',
|
11 |
+
'Global warming is driving polar bears toward extinction',
|
12 |
+
'Global warming is driving polar bears toward extinction',
|
13 |
+
'Climate skeptics argue 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.',
|
14 |
+
'Climate skeptics argue 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.',
|
15 |
+
'Climate skeptics argue 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.',
|
16 |
+
'Climate skeptics argue 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.',
|
17 |
+
'Climate skeptics argue 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.',
|
18 |
+
'We don\'t expect record years every year, but the ongoing long-term warming trend is clear.',
|
19 |
+
'We don\'t expect record years every year, but the ongoing long-term warming trend is clear.',
|
20 |
+
'We don\'t expect record years every year, but the ongoing long-term warming trend is clear.',
|
21 |
+
'We don\'t expect record years every year, but the ongoing long-term warming trend is clear.',
|
22 |
+
'We don\'t expect record years every year, but the ongoing long-term warming trend is clear.',
|
23 |
+
'It is increasingly clear that the planet was significantly warmer than today several times during the past 10,000 years.',
|
24 |
+
'It is increasingly clear that the planet was significantly warmer than today several times during the past 10,000 years.',
|
25 |
+
'It is increasingly clear that the planet was significantly warmer than today several times during the past 10,000 years.',
|
26 |
+
'It is increasingly clear that the planet was significantly warmer than today several times during the past 10,000 years.',
|
27 |
+
'It is increasingly clear that the planet was significantly warmer than today several times during the past 10,000 years.',
|
28 |
+
'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.',
|
29 |
+
'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.',
|
30 |
+
'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.',
|
31 |
+
'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.',
|
32 |
+
'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.']
|
33 |
+
|
34 |
+
ex_evidence = ['Recent Research Shows Human Activity Driving Earth Towards Global Extinction Event.',
|
35 |
+
'Environmental impacts include the extinction or relocation of many species as their ecosystems change, most immediately the environments of coral reefs, mountains, and the Arctic.',
|
36 |
+
'Rising temperatures push bees to their physiological limits, and could cause the extinction of bee populations.',
|
37 |
+
'Rising global temperatures, caused by the greenhouse effect, contribute to habitat destruction, endangering various species, such as the polar bear.',
|
38 |
+
'"Bear hunting caught in global warming debate".',
|
39 |
+
'It is a major aspect of climate change, and has been demonstrated by the instrumental temperature record which shows global warming of around 1\xa0°C since the pre-industrial period, although the bulk of this (0.9°C) has occurred since 1970.',
|
40 |
+
'Improved measurement and analysis techniques have reconciled this discrepancy: corrected buoy and satellite surface temperatures are slightly cooler and corrected satellite and radiosonde measurements of the tropical troposphere are slightly warmer.',
|
41 |
+
'Reconstructions have consistently shown that the rise in the instrumental temperature record of the past 150 years is not matched in earlier centuries, and the name "hockey stick graph" was coined for figures showing a long-term decline followed by an abrupt rise in temperatures.',
|
42 |
+
'It concluded, "The weight of current multi-proxy evidence, therefore, suggests greater 20th-century warmth, in comparison with temperature levels of the previous 400 years, than was shown in the TAR.',
|
43 |
+
'In at least some areas, the recent period appears to be warmer than has been the case for a thousand or more years".',
|
44 |
+
'Climate change is a long-term, sustained trend of change in climate.',
|
45 |
+
'Using the long-term temperature trends for the earth scientists and statisticians conclude that it continues to warm through time.',
|
46 |
+
'While record-breaking years attract considerable public interest, individual years are less significant than the overall trend.',
|
47 |
+
'This long-term trend is the main cause for the record warmth of 2015 and 2016, surpassing all previous years—even ones with strong El Niño events."',
|
48 |
+
'Between 1850 and 1950 a long-term trend of gradual climate warming is observable, and during this same period the Marsham record of oak-leafing dates tended to become earlier.',
|
49 |
+
'During the Mesozoic, the world, including India, was considerably warmer than today.',
|
50 |
+
'Consequently, summers are 2.3\xa0°C (4\xa0°F) warmer in the Northern Hemisphere than in the Southern Hemisphere under similar conditions.',
|
51 |
+
'The result is a picture of relatively cool conditions in the seventeenth and early nineteenth centuries and warmth in the eleventh and early fifteenth centuries, but the warmest conditions are apparent in the twentieth century.',
|
52 |
+
"The current scientific consensus is that: Earth's climate has warmed significantly since the late 1800s.",
|
53 |
+
'However, the geological record demonstrates that Earth has remained at a fairly constant temperature throughout its history, and that the young Earth was somewhat warmer than it is today.',
|
54 |
+
'Tropical deforestation is responsible for approximately 20% of world greenhouse gas emissions.',
|
55 |
+
'Of these emissions, 65% was carbon dioxide from fossil fuel burning and industry, 11% was carbon dioxide from land use change, which is primarily due to deforestation, 16% was from methane, 6.2% was from nitrous oxide, and 2.0% was from fluorinated gases.',
|
56 |
+
'Land-use change, such as deforestation, caused about 31% of cumulative emissions over 1870–2017, coal 32%, oil 25%, and gas 10%.',
|
57 |
+
'The estimate of total CO 2 emissions includes biotic carbon emissions, mainly from deforestation.',
|
58 |
+
'The vast majority of anthropogenic carbon dioxide emissions come from combustion of fossil fuels, principally coal, oil, and natural gas, with additional contributions coming from deforestation, changes in land use, soil erosion and agriculture (including livestock).']
|
59 |
+
|
60 |
+
ex_labels = ['NOT_ENOUGH_INFO',
|
61 |
+
'SUPPORTS',
|
62 |
+
'NOT_ENOUGH_INFO',
|
63 |
+
'SUPPORTS',
|
64 |
+
'NOT_ENOUGH_INFO',
|
65 |
+
'NOT_ENOUGH_INFO',
|
66 |
+
'NOT_ENOUGH_INFO',
|
67 |
+
'NOT_ENOUGH_INFO',
|
68 |
+
'REFUTES',
|
69 |
+
'REFUTES',
|
70 |
+
'NOT_ENOUGH_INFO',
|
71 |
+
'SUPPORTS',
|
72 |
+
'NOT_ENOUGH_INFO',
|
73 |
+
'SUPPORTS',
|
74 |
+
'SUPPORTS',
|
75 |
+
'NOT_ENOUGH_INFO',
|
76 |
+
'NOT_ENOUGH_INFO',
|
77 |
+
'NOT_ENOUGH_INFO',
|
78 |
+
'NOT_ENOUGH_INFO',
|
79 |
+
'NOT_ENOUGH_INFO',
|
80 |
+
'REFUTES',
|
81 |
+
'NOT_ENOUGH_INFO',
|
82 |
+
'REFUTES',
|
83 |
+
'NOT_ENOUGH_INFO',
|
84 |
+
'NOT_ENOUGH_INFO']
|
85 |
+
|
86 |
+
ex_df = pd.DataFrame({'claim' : ex_claims, 'evidence' : ex_evidence, 'label': ex_labels})
|
87 |
|
88 |
# title
|
89 |
st.title('Combatting Climate Change Misinformation with Transformers')
|