Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,8 +17,8 @@ from llama_index.llms.huggingface import (
|
|
17 |
|
18 |
system_propmpt = "You are a friendly Chatbot."
|
19 |
|
20 |
-
# "facebook/blenderbot-400M-distill", facebook/blenderbot-400M-distill , BAAI/bge-small-en-v1.5
|
21 |
-
Settings.llm = HuggingFaceLLM(model_name="
|
22 |
device_map="auto",
|
23 |
system_prompt = system_propmpt,
|
24 |
context_window=4096,
|
@@ -26,10 +26,10 @@ Settings.llm = HuggingFaceLLM(model_name="stabilityai/stablelm-zephyr-3b",
|
|
26 |
# stopping_ids=[50278, 50279, 50277, 1, 0],
|
27 |
generate_kwargs={"temperature": 0.5, "do_sample": False},
|
28 |
# tokenizer_kwargs={"max_length": 4096},
|
29 |
-
tokenizer_name="
|
30 |
)
|
31 |
|
32 |
-
Settings.embed_model = HuggingFaceEmbedding(model_name="
|
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."),
|
35 |
Document(text="Indian parliament elections happened in 2020. ABC Party won."),
|
|
|
17 |
|
18 |
system_propmpt = "You are a friendly Chatbot."
|
19 |
|
20 |
+
# "facebook/blenderbot-400M-distill", facebook/blenderbot-400M-distill, stabilityai/stablelm-zephyr-3b, BAAI/bge-small-en-v1.5
|
21 |
+
Settings.llm = HuggingFaceLLM(model_name="mistralai/Mistral-Nemo-Instruct-2407",
|
22 |
device_map="auto",
|
23 |
system_prompt = system_propmpt,
|
24 |
context_window=4096,
|
|
|
26 |
# stopping_ids=[50278, 50279, 50277, 1, 0],
|
27 |
generate_kwargs={"temperature": 0.5, "do_sample": False},
|
28 |
# tokenizer_kwargs={"max_length": 4096},
|
29 |
+
tokenizer_name="mistralai/Mistral-Nemo-Instruct-2407",
|
30 |
)
|
31 |
|
32 |
+
Settings.embed_model = HuggingFaceEmbedding(model_name="nvidia/NV-Embed-v2")
|
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."),
|
35 |
Document(text="Indian parliament elections happened in 2020. ABC Party won."),
|