getting game list from URL
Browse files- GamePhysics.py +6 -5
GamePhysics.py
CHANGED
@@ -2,11 +2,11 @@
|
|
2 |
|
3 |
from __future__ import absolute_import, division, print_function
|
4 |
|
|
|
5 |
import csv
|
6 |
import json
|
7 |
-
import os
|
8 |
-
|
9 |
import datasets
|
|
|
10 |
from datasets import Dataset
|
11 |
|
12 |
_CITATION = """\
|
@@ -26,9 +26,10 @@ _HOMEPAGE = "https://asgaardlab.github.io/CLIPxGamePhysics/"
|
|
26 |
|
27 |
_LICENSE = "MIT"
|
28 |
|
29 |
-
with
|
30 |
-
|
31 |
-
|
|
|
32 |
|
33 |
_URLs = {
|
34 |
k: f"https://huggingface.co/datasets/taesiri/GamePhysics/resolve/main/data/{v}"
|
|
|
2 |
|
3 |
from __future__ import absolute_import, division, print_function
|
4 |
|
5 |
+
import os
|
6 |
import csv
|
7 |
import json
|
|
|
|
|
8 |
import datasets
|
9 |
+
import urllib.request
|
10 |
from datasets import Dataset
|
11 |
|
12 |
_CITATION = """\
|
|
|
26 |
|
27 |
_LICENSE = "MIT"
|
28 |
|
29 |
+
with urllib.request.urlopen(
|
30 |
+
"https://huggingface.co/datasets/taesiri/GamePhysics/raw/main/list_of_games.json"
|
31 |
+
) as url:
|
32 |
+
_GAMEs = json.loads(url.read().decode())
|
33 |
|
34 |
_URLs = {
|
35 |
k: f"https://huggingface.co/datasets/taesiri/GamePhysics/resolve/main/data/{v}"
|