rdpahalavan commited on
Commit
1204c23
1 Parent(s): 1ea40b2

Update CIC-IDS2017.py

Browse files
Files changed (1) hide show
  1. CIC-IDS2017.py +8 -7
CIC-IDS2017.py CHANGED
@@ -46,13 +46,14 @@ class CICIDS2017(datasets.GeneratorBasedBuilder):
46
  )
47
 
48
  def _split_generators(self, dl_manager):
49
- url = os.path.join(self.config.data_dir, _URLS[self.config.name])
50
- return [
51
- datasets.SplitGenerator(
52
- name=datasets.Split.TRAIN,
53
- gen_kwargs={"filepath": url},
54
- ),
55
- ]
 
56
 
57
  def _generate_examples(self, filepath):
58
  df = pd.read_csv(filepath)
 
46
  )
47
 
48
  def _split_generators(self, dl_manager):
49
+ url = f"https://huggingface.co/datasets/rdpahalavan/CIC-IDS2017/blob/main/{_URLS[self.config.name]}"
50
+ downloaded_file = dl_manager.download(url)
51
+ return [
52
+ datasets.SplitGenerator(
53
+ name=datasets.Split.TRAIN,
54
+ gen_kwargs={"filepath": downloaded_file},
55
+ ),
56
+ ]
57
 
58
  def _generate_examples(self, filepath):
59
  df = pd.read_csv(filepath)