forked from p04798526/LLaMA-Factory-Mirror
fix webui
This commit is contained in:
parent
ac88ce5233
commit
befaab5720
|
@ -58,7 +58,7 @@ def create_sft_tab(top_elems: Dict[str, "Component"], runner: "Runner") -> Dict[
|
|||
stop_btn = gr.Button()
|
||||
|
||||
with gr.Row():
|
||||
with gr.Column(scale=4):
|
||||
with gr.Column(scale=3):
|
||||
output_dir = gr.Textbox()
|
||||
|
||||
with gr.Box():
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
import gradio as gr
|
||||
from typing import TYPE_CHECKING, Any, Dict, List
|
||||
from gradio.components import Component
|
||||
from typing import Any, Dict, List
|
||||
|
||||
from llmtuner.webui.common import get_model_path, list_dataset, load_config
|
||||
from llmtuner.webui.locales import LOCALES
|
||||
from llmtuner.webui.utils import get_time
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from gradio.components import Component
|
||||
|
||||
|
||||
class Manager:
|
||||
|
||||
def __init__(self, elem_list: List[Dict[str, "Component"]]):
|
||||
def __init__(self, elem_list: List[Dict[str, Component]]):
|
||||
self.elem_list = elem_list
|
||||
|
||||
def gen_refresh(self) -> Dict[str, Any]:
|
||||
|
@ -26,7 +24,7 @@ class Manager:
|
|||
|
||||
return refresh_dict
|
||||
|
||||
def gen_label(self, lang: str) -> Dict["Component", dict]:
|
||||
def gen_label(self, lang: str) -> Dict[Component, Dict[str, Any]]: # cannot use TYPE_CHECKING
|
||||
update_dict = {}
|
||||
refresh_dict = self.gen_refresh()
|
||||
|
||||
|
|
Loading…
Reference in New Issue