abhi1nandy2 commited on
Commit
53b4ef0
·
verified ·
1 Parent(s): 238cad8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -30,9 +30,9 @@ for ext in extensions:
30
  """
31
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
32
  """
33
- client = InferenceClient("microsoft/DialoGPT-small")#("TheBloke/TinyLlama-1.1B-Chat-v1.0-GPTQ")#("TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF")#("QuantFactory/Meta-Llama-3-8B-Instruct-GGUF")#("HuggingFaceH4/zephyr-7b-beta")
34
 
35
- SYSTEM_MESSAGE = "You are a QA chatbot to answer queries on my homepage that has the following information -\n\n" + "\n\n".join(text_list) + "\n\n<|endoftext|>"
36
 
37
  def respond(
38
  message,
@@ -47,10 +47,10 @@ def respond(
47
  for val in history:
48
  # if val[0]:
49
  if len(val)>=1:
50
- messages.append({"role": "user", "content": "Question: "+val[0]+"<|endoftext|>"})
51
  # if val[1]:
52
  if len(val)>=2:
53
- messages.append({"role": "assistant", "content": "Answer: "+val[1]+"<|endoftext|>"})
54
 
55
  messages.append({"role": "user", "content": message})
56
 
 
30
  """
31
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
32
  """
33
+ client = InferenceClient("lachiewyoung/mistral-7b-instruct-1.58bit")#("TheBloke/TinyLlama-1.1B-Chat-v1.0-GPTQ")#("TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF")#("QuantFactory/Meta-Llama-3-8B-Instruct-GGUF")#("HuggingFaceH4/zephyr-7b-beta")
34
 
35
+ SYSTEM_MESSAGE = "You are a QA chatbot to answer queries on my homepage that has the following information -\n\n" + "\n\n".join(text_list) + "\n\n"
36
 
37
  def respond(
38
  message,
 
47
  for val in history:
48
  # if val[0]:
49
  if len(val)>=1:
50
+ messages.append({"role": "user", "content": "Question: "+val[0]})
51
  # if val[1]:
52
  if len(val)>=2:
53
+ messages.append({"role": "assistant", "content": "Answer: "+val[1]})
54
 
55
  messages.append({"role": "user", "content": message})
56