Former-commit-id: 7dce1763be4374cf616d96db95ae964ff510a9d6
This commit is contained in:
hiyouga
2024-04-17 22:17:19 +08:00
parent 171a029c5e
commit 9f6349a333
15 changed files with 75 additions and 32 deletions

View File

@@ -1,7 +1,6 @@
from typing import Any, Dict, Generator
from gradio.components import Component # cannot use TYPE_CHECKING here
from ..extras.packages import is_gradio_available
from .chatter import WebChatModel
from .common import get_model_path, list_dataset, load_config
from .locales import LOCALES
@@ -10,6 +9,10 @@ from .runner import Runner
from .utils import get_time
if is_gradio_available():
from gradio.components import Component # cannot use TYPE_CHECKING here
class Engine:
def __init__(self, demo_mode: bool = False, pure_chat: bool = False) -> None:
self.demo_mode = demo_mode