zwn22 commited on
Commit
ed60683
1 Parent(s): 72c9a2c

Update NC_Crime.py

Browse files
Files changed (1) hide show
  1. NC_Crime.py +3 -2
NC_Crime.py CHANGED
@@ -78,9 +78,9 @@ class NCCrimeDataset(datasets.GeneratorBasedBuilder):
78
  )
79
 
80
  def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
81
- # Download and extract the data file
82
  downloaded_file_path = dl_manager.download_and_extract(
83
- "https://github.com/zening-wang2023/NC-Crime-Dataset/blob/main/Test.csv")
84
 
85
  # Return a list of split generators
86
  return [
@@ -89,6 +89,7 @@ class NCCrimeDataset(datasets.GeneratorBasedBuilder):
89
  datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_file_path}),
90
  ]
91
 
 
92
  def _generate_examples(self, filepath):
93
  # Read the CSV file
94
  df = pd.read_csv(filepath) ## just for test
 
78
  )
79
 
80
  def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
81
+ # Use the raw GitHub link to download the CSV file
82
  downloaded_file_path = dl_manager.download_and_extract(
83
+ "https://raw.githubusercontent.com/zening-wang2023/NC-Crime-Dataset/main/Test.csv")
84
 
85
  # Return a list of split generators
86
  return [
 
89
  datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_file_path}),
90
  ]
91
 
92
+
93
  def _generate_examples(self, filepath):
94
  # Read the CSV file
95
  df = pd.read_csv(filepath) ## just for test