feat: merge huggingface

This commit is contained in:
莘权 马 2023-12-13 19:18:38 +08:00
parent 4582f65cf8
commit 379b7b5820
9 changed files with 73 additions and 45 deletions

View file

@ -358,3 +358,14 @@ def is_subscribed(message, tags):
if t in message.send_to:
return True
return False
def any_to_name(val):
"""
Convert a value to its name by extracting the last part of the dotted path.
:param val: The value to convert.
:return: The name of the value.
"""
return any_to_str(val).split(".")[-1]