ekaterinatao's picture
Update config_data/config.py
bf2f1c2 verified
raw
history blame contribute delete
990 Bytes
from dataclasses import dataclass
import os
@dataclass
class TgBot:
token: str
admin_ids: list[int]
@dataclass
class DataConfig:
dataset: str
cls_vec: str
@dataclass
class ModelConfig:
bi_checkpoint: str
cross_checkpoint: str
device: str
hf_client: str
@dataclass
class Config:
tg_bot: TgBot
data: DataConfig
model: ModelConfig
def load_config(path: str='.env') -> Config:
return Config(
tg_bot=TgBot(
token=os.environ['telegram_token'],
admin_ids=os.environ['telegram_admin']
),
data=DataConfig(
dataset='ekaterinatao/house_md_context3',
cls_vec='ekaterinatao/house_md_cls_embeds'
),
model=ModelConfig(
bi_checkpoint='ekaterinatao/house-md-bot-bert-bi-encoder',
cross_checkpoint='ekaterinatao/house-md-bot-bert-cross-encoder',
device='cpu',
hf_client='ekaterinatao/house_md_bot'
)
)