ForzaJuve1
commited on
Commit
•
0b199f4
1
Parent(s):
b78307d
Update Integration.py
Browse files- Integration.py +20 -9
Integration.py
CHANGED
@@ -6,6 +6,7 @@ import sys
|
|
6 |
import ast
|
7 |
import json
|
8 |
import yaml
|
|
|
9 |
|
10 |
class Euro2020Dataset(GeneratorBasedBuilder):
|
11 |
VERSION = "1.0.0"
|
@@ -535,18 +536,28 @@ class Euro2020Dataset(GeneratorBasedBuilder):
|
|
535 |
citation="Optional citation"
|
536 |
)
|
537 |
|
538 |
-
def
|
539 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
540 |
#1RKoAQwq68LASd4ret_OKYUkF4B4m6hnu
|
541 |
-
downloaded_file = dl_manager.download(file_url)
|
542 |
#dl_path = dl_manager.download_and_extract({'train_csv': file_url})
|
543 |
|
544 |
-
return [
|
545 |
-
SplitGenerator(
|
546 |
-
name="train",
|
547 |
-
gen_kwargs={"filepath": downloaded_file},#dl_path['train_csv']},
|
548 |
-
),
|
549 |
-
]
|
550 |
|
551 |
# Increase the maximum field size limit
|
552 |
#csv.field_size_limit(sys.maxsize)
|
|
|
6 |
import ast
|
7 |
import json
|
8 |
import yaml
|
9 |
+
import requests
|
10 |
|
11 |
class Euro2020Dataset(GeneratorBasedBuilder):
|
12 |
VERSION = "1.0.0"
|
|
|
536 |
citation="Optional citation"
|
537 |
)
|
538 |
|
539 |
+
def download_file(url, filename):
|
540 |
+
with requests.get(url, stream=True) as r:
|
541 |
+
r.raise_for_status()
|
542 |
+
with open(filename, 'wb') as f:
|
543 |
+
for chunk in r.iter_content(chunk_size=8192):
|
544 |
+
f.write(chunk)
|
545 |
+
|
546 |
+
file_url = "https://drive.google.com/uc?id=1QiF2WnnI2cxFDpLoetabx9Pe-DgUuV81"
|
547 |
+
download_file(file_url, 'data.parquet')
|
548 |
+
|
549 |
+
#def _split_generators(self, dl_manager):
|
550 |
+
#file_url = 'https://github.com/gchcg/Projects/raw/main/Euro2020.parquet' #"https://drive.google.com/uc?id=1QiF2WnnI2cxFDpLoetabx9Pe-DgUuV81"
|
551 |
#1RKoAQwq68LASd4ret_OKYUkF4B4m6hnu
|
552 |
+
#downloaded_file = dl_manager.download(file_url)
|
553 |
#dl_path = dl_manager.download_and_extract({'train_csv': file_url})
|
554 |
|
555 |
+
#return [
|
556 |
+
#SplitGenerator(
|
557 |
+
#name="train",
|
558 |
+
#gen_kwargs={"filepath": downloaded_file},#dl_path['train_csv']},
|
559 |
+
#),
|
560 |
+
#]
|
561 |
|
562 |
# Increase the maximum field size limit
|
563 |
#csv.field_size_limit(sys.maxsize)
|