Saptarshi7 commited on
Commit
f55ad13
1 Parent(s): 0b19223

Upload covid_qa_cleaned_CS.py

Browse files
Files changed (1) hide show
  1. covid_qa_cleaned_CS.py +12 -4
covid_qa_cleaned_CS.py CHANGED
@@ -33,7 +33,7 @@ Cleaned version of COVID-QA containing fixes as mentioned in <paper yet to be pu
33
  _LICENSE = "Apache License 2.0"
34
 
35
 
36
- _URL = "https://raw.githubusercontent.com/saptarshi059/CDQA-v2-Auxilliary-Loss/main/data/covid_qa_cleaned_CS/"
37
  _URLs = {"covid_qa_cleaned_CS": _URL + "covid_qa_cleaned_CS.json"}
38
 
39
 
@@ -73,13 +73,21 @@ class CovidQADeepsetCleaned(datasets.GeneratorBasedBuilder):
73
  )
74
 
75
  def _split_generators(self, dl_manager):
76
- url = _URLs[self.config.name]
77
- downloaded_filepath = dl_manager.download_and_extract(url)
 
 
 
 
 
 
 
 
78
 
79
  return [
80
  datasets.SplitGenerator(
81
  name=datasets.Split.TRAIN,
82
- gen_kwargs={"filepath": downloaded_filepath},
83
  ),
84
  ]
85
 
 
33
  _LICENSE = "Apache License 2.0"
34
 
35
 
36
+ _URL = "https://github.com/saptarshi059/CDQA-v2-Auxilliary-Loss/blob/main/data/covid_qa_cleaned_CS/"
37
  _URLs = {"covid_qa_cleaned_CS": _URL + "covid_qa_cleaned_CS.json"}
38
 
39
 
 
73
  )
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'
80
+ auth = ('saptarshi059', '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')
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": r.json()},
91
  ),
92
  ]
93