Upload database.py
Browse files4 unmodified lines5678910111213141516174 unmodified linesfrom itertools import chainfrom zipfile import ZipFilefrom copy import deepcopyfrom convlab.util.unified_datasets_util import BaseDatabaseclass Database(BaseDatabase):def __init__(self):"""extract data.zip and load the database."""archive = ZipFile(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data.zip'))self.domains = ['restaurant', 'hotel', 'attraction', 'train', 'hospital', 'police']self.dbs = {}for domain in self.domains:4 unmodified lines567891011121314151617184 unmodified linesfrom itertools import chainfrom zipfile import ZipFilefrom copy import deepcopyfrom convlab.util.unified_datasets_util import BaseDatabase, download_unified_datasetsclass Database(BaseDatabase):def __init__(self):"""extract data.zip and load the database."""data_path = download_unified_datasets('multiwoz21', 'data.zip', os.path.dirname(os.path.abspath(__file__)))archive = ZipFile(data_path)self.domains = ['restaurant', 'hotel', 'attraction', 'train', 'hospital', 'police']self.dbs = {}for domain in self.domains:
database.py+3-2