From 68ead01899811ebd2eed3202aabd83d0e758616b Mon Sep 17 00:00:00 2001 From: tastelikefeet <58414341+tastelikefeet@users.noreply.github.com> Date: Tue, 13 Aug 2024 17:54:35 +0800 Subject: [PATCH] fix video component (#1692) --- swift/ui/llm_eval/eval.py | 3 ++- swift/ui/llm_infer/llm_infer.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/swift/ui/llm_eval/eval.py b/swift/ui/llm_eval/eval.py index c7a53fdc25..803c13f863 100644 --- a/swift/ui/llm_eval/eval.py +++ b/swift/ui/llm_eval/eval.py @@ -118,7 +118,8 @@ def do_build_ui(cls, base_tab: Type['BaseUI']): from evalscope.backend.vlm_eval_kit import VLMEvalKitBackendManager eval_dataset_list = ( OpenCompassBackendManager.list_datasets() + VLMEvalKitBackendManager.list_supported_datasets()) - except ImportError: + except Exception as e: + logger.error(e) eval_dataset_list = [ 'AX_b', 'winogrande', 'mmlu', 'afqmc', 'COPA', 'commonsenseqa', 'CMRC', 'lcsts', 'nq', 'ocnli_fc', 'math', 'mbpp', 'DRCD', 'TheoremQA', 'CB', 'ReCoRD', 'lambada', 'tnews', 'flores', 'humaneval', 'AX_g', diff --git a/swift/ui/llm_infer/llm_infer.py b/swift/ui/llm_infer/llm_infer.py index e3dba33270..30eb96829f 100644 --- a/swift/ui/llm_infer/llm_infer.py +++ b/swift/ui/llm_infer/llm_infer.py @@ -141,7 +141,7 @@ def do_build_ui(cls, base_tab: Type['BaseUI']): with gr.TabItem(label='Image'): image = gr.Image(type='filepath') with gr.TabItem(label='Video'): - video = gr.Video(type='filepath') + video = gr.Video() with gr.TabItem(label='Audio'): audio = gr.Audio(type='filepath')