Corey Morris commited on
Commit
2f457d8
1 Parent(s): a13887a

removed commented code

Browse files
Files changed (1) hide show
  1. details_data_processor.py +0 -38
details_data_processor.py CHANGED
@@ -28,44 +28,6 @@ class DetailsDataProcessor:
28
  matching_files.append(filename) # Append the matching filename to the list
29
  return matching_files # Return the list of matching filenames
30
 
31
-
32
- # @staticmethod
33
- # def download_file(url, directory='details_data'):
34
- # # Define the prefix to be removed from the URL
35
- # url_prefix = "https://huggingface.co/datasets/open-llm-leaderboard/details/resolve/main/"
36
-
37
- # # Remove the prefix from the URL
38
- # file_name_part = url.replace(url_prefix, '')
39
-
40
- # # Replace characters that don't play nice with file systems
41
- # safe_file_name = re.sub(r'[<>:"/\\|?*]', '_', file_name_part) # Replace with '_'
42
-
43
- # save_file_path = os.path.join(directory, safe_file_name)
44
-
45
- # error_count = 0
46
- # success_count = 0
47
- # try:
48
- # # Sending a GET request
49
- # r = requests.get(url, allow_redirects=True)
50
- # r.raise_for_status()
51
-
52
- # # Writing the content to the specified file
53
- # with open(save_file_path, 'wb') as file:
54
- # file.write(r.content)
55
-
56
- # success_count += 1
57
- # except requests.ConnectionError as e:
58
- # error_count += 1
59
- # except requests.HTTPError as e:
60
- # error_count += 1
61
- # except FileNotFoundError as e:
62
- # error_count += 1
63
- # except Exception as e:
64
- # error_count += 1
65
-
66
- # return error_count, success_count
67
-
68
-
69
  @staticmethod
70
  def download_file(url, directory='details_data'):
71
  # Extract relevant parts from the URL
 
28
  matching_files.append(filename) # Append the matching filename to the list
29
  return matching_files # Return the list of matching filenames
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  @staticmethod
32
  def download_file(url, directory='details_data'):
33
  # Extract relevant parts from the URL