Datasets:
ArXiv:
License:
Saptarshi7
commited on
Commit
•
7aa0147
1
Parent(s):
8fd4073
Upload covid_qa_cleaned_CS.py
Browse files- covid_qa_cleaned_CS.py +7 -1
covid_qa_cleaned_CS.py
CHANGED
@@ -81,13 +81,19 @@ class CovidQADeepsetCleaned(datasets.GeneratorBasedBuilder):
|
|
81 |
|
82 |
r = requests.get(url, auth=auth)
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
#url = _URLs[self.config.name]
|
85 |
#downloaded_filepath = dl_manager.download_and_extract(r)
|
86 |
|
87 |
return [
|
88 |
datasets.SplitGenerator(
|
89 |
name=datasets.Split.TRAIN,
|
90 |
-
gen_kwargs={"filepath":
|
91 |
),
|
92 |
]
|
93 |
|
|
|
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 |
+
|
89 |
+
|
90 |
#url = _URLs[self.config.name]
|
91 |
#downloaded_filepath = dl_manager.download_and_extract(r)
|
92 |
|
93 |
return [
|
94 |
datasets.SplitGenerator(
|
95 |
name=datasets.Split.TRAIN,
|
96 |
+
gen_kwargs={"filepath": 'my_temp/covid_qa_cleaned_CS.json'},
|
97 |
),
|
98 |
]
|
99 |
|