use poetry

This commit is contained in:
Michael Yang
2023-06-27 13:55:53 -07:00
parent 1459ffc9f3
commit 7737ec0775
7 changed files with 1363 additions and 22 deletions

View File

@@ -1,7 +1,6 @@
import os
import json
import sys
import shutil
from contextlib import contextmanager
from llama_cpp import Llama as LLM
from template import template
@@ -62,9 +61,3 @@ def load(model, models_home=".", llms={}):
def unload(model, llms={}):
if model in llms:
llms.pop(model)
def add(file, models_home=".", *args, **kwargs):
if not os.path.exists(file):
raise ValueError("Model file {model} not found")
shutil.move(file, models_home)