From bf68fd36832b3434405ad6f83fd976998469a4c1 Mon Sep 17 00:00:00 2001 From: Lucain Date: Tue, 13 Aug 2024 13:13:20 +0200 Subject: [PATCH] Update ChatHaruhi.py (remove deprecated use of `ModelFilter`) This PR remove deprecated use of `ModelFilter`. Arguments can now be passed to `list_models` directly. See https://github.com/huggingface/huggingface_hub/issues/2028 for more details. --- ChatHaruhi2.0/ChatHaruhi/ChatHaruhi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ChatHaruhi2.0/ChatHaruhi/ChatHaruhi.py b/ChatHaruhi2.0/ChatHaruhi/ChatHaruhi.py index c4dc7078..2c2ac4a2 100644 --- a/ChatHaruhi2.0/ChatHaruhi/ChatHaruhi.py +++ b/ChatHaruhi2.0/ChatHaruhi/ChatHaruhi.py @@ -261,10 +261,9 @@ def get_models(self, model_name): from .Qwen118k2GPT import Qwen118k2GPT, Qwen_tokenizer return (Qwen118k2GPT(model = "Qwen/Qwen-1_8B-Chat"), Qwen_tokenizer) from huggingface_hub import HfApi - from huggingface_hub.hf_api import ModelFilter qwen_api = HfApi() qwen_models = qwen_api.list_models( - filter = ModelFilter(model_name=model_name), + model_name=model_name, author = "silk-road" ) qwen_models_id = []