Datasets:
ArXiv:
License:
Saptarshi7
commited on
Commit
•
2f8cf0a
1
Parent(s):
7aa0147
Upload covid_qa_cleaned_CS.py
Browse files- covid_qa_cleaned_CS.py +6 -3
covid_qa_cleaned_CS.py
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
-
"""
|
16 |
|
17 |
|
18 |
import json
|
@@ -41,7 +41,7 @@ class CovidQADeepsetCleaned(datasets.GeneratorBasedBuilder):
|
|
41 |
VERSION = datasets.Version("1.0.0")
|
42 |
|
43 |
BUILDER_CONFIGS = [
|
44 |
-
datasets.BuilderConfig(name="covid_qa_cleaned_CS", version=VERSION, description="COVID-QA deepset
|
45 |
]
|
46 |
|
47 |
def _info(self):
|
@@ -74,6 +74,9 @@ class CovidQADeepsetCleaned(datasets.GeneratorBasedBuilder):
|
|
74 |
|
75 |
def _split_generators(self, dl_manager):
|
76 |
|
|
|
|
|
|
|
77 |
import requests
|
78 |
|
79 |
url = 'https://raw.githubusercontent.com/saptarshi059/CDQA-v2-Auxilliary-Loss/main/data/covid_qa_cleaned_CS/covid_qa_cleaned_CS.json'
|
@@ -81,8 +84,8 @@ class CovidQADeepsetCleaned(datasets.GeneratorBasedBuilder):
|
|
81 |
|
82 |
r = requests.get(url, auth=auth)
|
83 |
|
84 |
-
import os, json
|
85 |
os.mkdir('my_temp')
|
|
|
86 |
with open('my_temp/covid_qa_cleaned_CS.json', 'w') as f:
|
87 |
json.dump(r.json(), f)
|
88 |
|
|
|
12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
+
"""covid_qa_cleaned_CS: Connor Heaton/Saptarshi Sengupta"""
|
16 |
|
17 |
|
18 |
import json
|
|
|
41 |
VERSION = datasets.Version("1.0.0")
|
42 |
|
43 |
BUILDER_CONFIGS = [
|
44 |
+
datasets.BuilderConfig(name="covid_qa_cleaned_CS", version=VERSION, description="Cleaned version of COVID-QA (deepset) by Connor Heaton & Saptarshi Sengupta"),
|
45 |
]
|
46 |
|
47 |
def _info(self):
|
|
|
74 |
|
75 |
def _split_generators(self, dl_manager):
|
76 |
|
77 |
+
#This code will be removed once the directory becomes public
|
78 |
+
|
79 |
+
|
80 |
import requests
|
81 |
|
82 |
url = 'https://raw.githubusercontent.com/saptarshi059/CDQA-v2-Auxilliary-Loss/main/data/covid_qa_cleaned_CS/covid_qa_cleaned_CS.json'
|
|
|
84 |
|
85 |
r = requests.get(url, auth=auth)
|
86 |
|
|
|
87 |
os.mkdir('my_temp')
|
88 |
+
|
89 |
with open('my_temp/covid_qa_cleaned_CS.json', 'w') as f:
|
90 |
json.dump(r.json(), f)
|
91 |
|