shoom013 commited on
Commit
1656fe0
·
verified ·
1 Parent(s): a54b9be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -17,7 +17,8 @@ from llama_index.llms.huggingface import (
17
 
18
  system_propmpt = "You are a friendly Chatbot."
19
 
20
- Settings.llm = HuggingFaceLLM(model_name="facebook/blenderbot-400M-distill",
 
21
  device_map="cpu",
22
  system_prompt = system_propmpt,
23
  context_window=4096,
@@ -25,8 +26,9 @@ Settings.llm = HuggingFaceLLM(model_name="facebook/blenderbot-400M-distill",
25
  stopping_ids=[50278, 50279, 50277, 1, 0],
26
  generate_kwargs={"temperature": 0.7, "do_sample": False},
27
  tokenizer_kwargs={"max_length": 4096},
28
- tokenizer_name="facebook/blenderbot-400M-distill",
29
  )
 
30
  Settings.embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-small-en-v1.5")
31
  documents = [Document(text="Indian parliament elections happened in April-May 2024. BJP Party won."),
32
  Document(text="Indian parliament elections happened in April-May 2021. XYZ Party won."),
 
17
 
18
  system_propmpt = "You are a friendly Chatbot."
19
 
20
+ # "facebook/blenderbot-400M-distill", facebook/blenderbot-400M-distill
21
+ Settings.llm = HuggingFaceLLM(model_name="HuggingFaceH4/zephyr-7b-beta",
22
  device_map="cpu",
23
  system_prompt = system_propmpt,
24
  context_window=4096,
 
26
  stopping_ids=[50278, 50279, 50277, 1, 0],
27
  generate_kwargs={"temperature": 0.7, "do_sample": False},
28
  tokenizer_kwargs={"max_length": 4096},
29
+ tokenizer_name="sentence-transformers/all-MiniLM-L6-v2",
30
  )
31
+
32
  Settings.embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-small-en-v1.5")
33
  documents = [Document(text="Indian parliament elections happened in April-May 2024. BJP Party won."),
34
  Document(text="Indian parliament elections happened in April-May 2021. XYZ Party won."),