Spaces:
Runtime error
Runtime error
alistairmcleay
commited on
Commit
•
4136982
1
Parent(s):
4bb4061
Fixing path loading
Browse files
src/crazyneuraluser/UBAR_code/db_ops.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
import json
|
|
|
|
|
2 |
import random
|
3 |
import sqlite3
|
4 |
import string
|
@@ -11,7 +13,7 @@ class MultiWozDB(object):
|
|
11 |
self.dbs = {}
|
12 |
self.sql_dbs = {}
|
13 |
for domain in all_domains:
|
14 |
-
with open(db_paths[domain], "r") as f:
|
15 |
self.dbs[domain] = json.loads(f.read().lower())
|
16 |
|
17 |
def oneHotVector(self, domain, num):
|
|
|
1 |
import json
|
2 |
+
import os
|
3 |
+
import pathlib
|
4 |
import random
|
5 |
import sqlite3
|
6 |
import string
|
|
|
13 |
self.dbs = {}
|
14 |
self.sql_dbs = {}
|
15 |
for domain in all_domains:
|
16 |
+
with open(os.path.abspath(db_paths[domain]), "r") as f:
|
17 |
self.dbs[domain] = json.loads(f.read().lower())
|
18 |
|
19 |
def oneHotVector(self, domain, num):
|