nprasad24 commited on
Commit
19c20c1
·
verified ·
1 Parent(s): 70a7d18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -15
app.py CHANGED
@@ -85,21 +85,8 @@ def ragChain():
85
  vectorstore = FAISS.from_documents(documents = docs, embedding = HuggingFaceEmbeddings())
86
  retriever = vectorstore.as_retriever(search_type = "similarity", search_kwargs = {"k": 5})
87
 
88
- #APIKEY = "o7T3gVx9Vt8GSJbLyPV1974vF8LXVp01CWqOkWQuHgoHm07H"
89
- #os.environ["FIREWORKS_API_KEY"] = APIKEY
90
- model = transformers.AutoModelForCausalLM.from_pretrained(
91
- 'mosaicml/mpt-1b-redpajama-200b',
92
- trust_remote_code=True,
93
- )
94
- model.eval()
95
- tokenizer = transformers.AutoTokenizer.from_pretrained("mosaicml/mpt-30b")
96
-
97
- generate_text = transformers.pipeline(
98
- model=model,
99
- tokenizer=tokenizer,
100
- return_full_text=True,
101
- )
102
- llm = HuggingFacePipeline(pipeline=generate_text)
103
 
104
  prompt = ChatPromptTemplate.from_messages(
105
  [
 
85
  vectorstore = FAISS.from_documents(documents = docs, embedding = HuggingFaceEmbeddings())
86
  retriever = vectorstore.as_retriever(search_type = "similarity", search_kwargs = {"k": 5})
87
 
88
+ api_key = os.getenv("APIKEY")
89
+ llm = ChatFireworks(model="accounts/fireworks/models/mixtral-8x7b-instruct", api_key = api_key)
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
  prompt = ChatPromptTemplate.from_messages(
92
  [