Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ChatHaruhi.py (remove deprecated use of ModelFilter) #80

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ChatHaruhi2.0/ChatHaruhi/ChatHaruhi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down