Spaces:
Runtime error
Runtime error
jiarongqiu commited on
Commit ·
cc5c9ae
1
Parent(s): 9ebbf3c
fix
Browse files- service/database.py +9 -6
service/database.py
CHANGED
|
@@ -15,12 +15,15 @@ class Database:
|
|
| 15 |
REPO = "Web3"
|
| 16 |
|
| 17 |
def __init__(self):
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
def load(self,dir:Dir):
|
| 26 |
dataset = load_dataset(self.USERNAME+'/'+self.REPO,data_dir=dir.path,ignore_verifications=True,split="train")
|
|
|
|
| 15 |
REPO = "Web3"
|
| 16 |
|
| 17 |
def __init__(self):
|
| 18 |
+
try:
|
| 19 |
+
self.scheduler = CommitScheduler(
|
| 20 |
+
repo_id=self.REPO,
|
| 21 |
+
repo_type="dataset",
|
| 22 |
+
folder_path=self.LOCAL,
|
| 23 |
+
token=os.getenv("HF_TOKEN")
|
| 24 |
+
)
|
| 25 |
+
except Exception as e:
|
| 26 |
+
print(e)
|
| 27 |
|
| 28 |
def load(self,dir:Dir):
|
| 29 |
dataset = load_dataset(self.USERNAME+'/'+self.REPO,data_dir=dir.path,ignore_verifications=True,split="train")
|