fix: import the loguru Logger class safely 59eccf0 SergeyDevyatkovcommentedJun 19, 2024 I found this as the best way for me: if TYPE_CHECKING: from loguru import Logger def some_method(logger: "Logger"): ...
parse import urljoin import sys sys.path.insert(1, "../../utils") #from utils.common import Common from loguru import logger class Dify: def __init__(self, data): #self.common = Common() self.config_data = data self.conversation_id = "" logger.debug(self.config_data) def get_...
errors import RPCError from loguru import logger from pyrogram.types import Message from pyrogram.enums import ParseMode from utils import check, cleaner from botmodule.init_bot import config, admin from utils.check import check_user, get_telegram_id_from_message @@ -74,7 +77,7 @@ async ...
generator import HtmlGenerator from loguru import logger class HTML2QA: def __init__(self, config): self.config = config['HTMLCfg'] Expand Down Expand Up @@ -126,7 +126,7 @@ def deal_with_html(self, html_code, configs): theme = self.fliter_html_label_all(flited_header).strip()...
import os from glob import glob from pathlib import Path from typing import Union from loguru import logger from natsort import natsorted AUDIO_EXTENSIONS = { ".mp3", ".wav", ".flac", ".ogg", ".m4a", ".wma", ".aac", ".aiff", ".aif", ".aifc", } def list_files( path: Union...
from typing import Any, Callable, Dict, Optional, Union import braceexpand import numpy as np import pandas as pd import torch import torchvision.datasets as datasets import webdataset as wds from loguru import logger from PIL import Image from torch.utils.data import ( DataLoader, Dataset, Itera...
from loguru import logger from xmlrpc.client import ServerProxy YAOJIU = ('1p','1m','1s','9p','9m','9s','E','S','W','N','P','F','C') TWOEIGHT = ('2p','2m','2s','8p','8m','8s') TFFSS = ('3p','3m','3s','4p','4m','4s','5p','5m','5s','6p','6m...
import torch.nn.functional as f from datasets import load_dataset from datasets import Dataset, load_dataset from deepspeed import DeepSpeedEngine from loguru import logger from PIL import Image from tqdm import tqdm try: @@ -379,7 +381,7 @@ def encode(self, sentences: list[str], batch_siz...
import os from loguru import logger log_path = os.path.join( os.path.dirname(os.path.abspath(__file__)), "logs/DouyinLiveRecorder.log" ) # 每天日志自动分文件 logger.add(log_path, rotation="12:00") 20 changes: 0 additions & 20 deletions 20 main.py Original file line numberDiff ...