GPT-Docker / app /run.py
heikowagner's picture
Delete chroma-embeddings.parquet.tmp
19b8811
raw
history blame
501 Bytes
# %%
import os
import pathlib
current_path = str( pathlib.Path(__file__).parent.resolve() )
with open(current_path+'/.openaiapikey', 'r') as reader:
os.environ['OPENAI_API_KEY']=reader.read()
import load_model
import cloudpickle
# %%
# llm = load_model.load_gpu_model("decapoda-research/llama-7b-hf")
llm= load_model.load_openai_model()
# %%
chain = load_model.create_chain(llm, collection="axa_terms_hkunlpinstructorlarge")
result = chain({"query": "What are AXAs green Goals?"})
print(result)