Spaces:
Build error
Build error
File size: 501 Bytes
7009660 19b8811 7009660 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# %%
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)
|