zhuqi commited on
Commit
0f0d653
1 Parent(s): 5e59e43

Upload database.py

Browse files
Files changed (1) hide show
  1. database.py +3 -2
database.py CHANGED
@@ -5,13 +5,14 @@ from fuzzywuzzy import fuzz
5
  from itertools import chain
6
  from zipfile import ZipFile
7
  from copy import deepcopy
8
- from convlab.util.unified_datasets_util import BaseDatabase
9
 
10
 
11
  class Database(BaseDatabase):
12
  def __init__(self):
13
  """extract data.zip and load the database."""
14
- archive = ZipFile(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data.zip'))
 
15
  self.domains = ['restaurant', 'hotel', 'attraction', 'train', 'hospital', 'police']
16
  self.dbs = {}
17
  for domain in self.domains:
 
5
  from itertools import chain
6
  from zipfile import ZipFile
7
  from copy import deepcopy
8
+ from convlab.util.unified_datasets_util import BaseDatabase, download_unified_datasets
9
 
10
 
11
  class Database(BaseDatabase):
12
  def __init__(self):
13
  """extract data.zip and load the database."""
14
+ data_path = download_unified_datasets('multiwoz21', 'data.zip', os.path.dirname(os.path.abspath(__file__)))
15
+ archive = ZipFile(data_path)
16
  self.domains = ['restaurant', 'hotel', 'attraction', 'train', 'hospital', 'police']
17
  self.dbs = {}
18
  for domain in self.domains: