anishde commited on
Commit
aa126db
1 Parent(s): 62d740e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -44,12 +44,12 @@ def add_text(history, text):
44
  def generate_response(history, query):
45
  global COUNT, N, chat_history, chain, k
46
  db=database()
47
- llm=HuggingFaceHub(repo_id="mistralai/Mixtral-8x7B-Instruct-v0.1", model_kwargs={"temperature":1, "max_length":500},huggingfacehub_api_token=apii)
48
  chain = load_qa_chain(llm, chain_type="stuff")
49
  doc = (db.similarity_search_with_score(query))
50
  score=doc[0][-1]
51
  doc = doc[0][:-1]
52
- threshold = 0.8
53
 
54
 
55
  if score > threshold:
 
44
  def generate_response(history, query):
45
  global COUNT, N, chat_history, chain, k
46
  db=database()
47
+ llm=HuggingFaceHub(repo_id="stabilityai/stable-code-3b", model_kwargs={"temperature":1, "max_length":500},huggingfacehub_api_token=apii)
48
  chain = load_qa_chain(llm, chain_type="stuff")
49
  doc = (db.similarity_search_with_score(query))
50
  score=doc[0][-1]
51
  doc = doc[0][:-1]
52
+ threshold = 0.7
53
 
54
 
55
  if score > threshold: