mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-12 00:37:04 +00:00
refactor
This commit is contained in:
9
ollama/model.py
Normal file
9
ollama/model.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from os import walk, path
|
||||
|
||||
|
||||
def models(models_home='.', *args, **kwargs):
|
||||
for root, _, files in walk(models_home):
|
||||
for file in files:
|
||||
base, ext = path.splitext(file)
|
||||
if ext == '.bin':
|
||||
yield base, path.join(root, file)
|
||||
Reference in New Issue
Block a user