mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
10
aiserver.py
10
aiserver.py
@@ -730,15 +730,7 @@ def getModelSelection(modellist):
|
|||||||
getModelSelection(mainmenu)
|
getModelSelection(mainmenu)
|
||||||
|
|
||||||
def check_if_dir_is_model(path):
|
def check_if_dir_is_model(path):
|
||||||
if os.path.exists(path):
|
return os.path.exists(os.path.join(path, 'config.json')):
|
||||||
try:
|
|
||||||
from transformers import AutoConfig
|
|
||||||
model_config = AutoConfig.from_pretrained(path)
|
|
||||||
except:
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
# Return all keys in tokenizer dictionary containing char
|
# Return all keys in tokenizer dictionary containing char
|
||||||
|
Reference in New Issue
Block a user