Spaces:
Build error
Build error
# %% | |
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) | |