Datasets:
Commit
·
d7fb0e1
1
Parent(s):
70bdff6
Update trailerShotScale.py
Browse files- trailerShotScale.py +3 -4
trailerShotScale.py
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
import datasets
|
18 |
from datasets.tasks import ImageClassification
|
19 |
import json
|
20 |
-
|
21 |
|
22 |
|
23 |
_HOMEPAGE = "https://huggingface.co/datasets/emanuelebezzecchi/trailerShotScale"
|
@@ -50,9 +50,8 @@ _NAMES = ["ECS","CS","MS","FS","LS"]
|
|
50 |
_JSON_DIR = "https://huggingface.co/datasets/emanuelebezzecchi/trailerShotScale/resolve/main/data.json"
|
51 |
_URL = "https://huggingface.co/datasets/emanuelebezzecchi/trailerShotScale/resolve/main/images.tar.gz"
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
imgLabels = data['labels']
|
56 |
|
57 |
|
58 |
class trailerShotScale(datasets.GeneratorBasedBuilder):
|
|
|
17 |
import datasets
|
18 |
from datasets.tasks import ImageClassification
|
19 |
import json
|
20 |
+
import requests
|
21 |
|
22 |
|
23 |
_HOMEPAGE = "https://huggingface.co/datasets/emanuelebezzecchi/trailerShotScale"
|
|
|
50 |
_JSON_DIR = "https://huggingface.co/datasets/emanuelebezzecchi/trailerShotScale/resolve/main/data.json"
|
51 |
_URL = "https://huggingface.co/datasets/emanuelebezzecchi/trailerShotScale/resolve/main/images.tar.gz"
|
52 |
|
53 |
+
data = json.loads(requests.get(_JSON_DIR).content)
|
54 |
+
imgLabels = data['labels']
|
|
|
55 |
|
56 |
|
57 |
class trailerShotScale(datasets.GeneratorBasedBuilder):
|