Spaces:
Runtime error
Runtime error
Update rag.py
Browse files
rag.py
CHANGED
@@ -43,9 +43,15 @@ class ChatPDF:
|
|
43 |
#
|
44 |
# tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
|
45 |
# model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1")
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
48 |
|
|
|
49 |
self.text_splitter = RecursiveCharacterTextSplitter(chunk_size=1024, chunk_overlap=100)
|
50 |
self.prompt = PromptTemplate.from_template(
|
51 |
"""
|
|
|
43 |
#
|
44 |
# tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
|
45 |
# model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1")
|
46 |
+
# TE GROOT VOOR DE FREE VERSION VAN HF SPACES (max 16 GB):
|
47 |
+
# tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
|
48 |
+
# self.model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1")
|
49 |
+
#
|
50 |
+
# https://huggingface.co/HuggingFaceH4/zephyr-7b-alpha?library=true
|
51 |
+
tokenizer = AutoTokenizer.from_pretrained("HuggingFaceH4/zephyr-7b-alpha")
|
52 |
+
self.model = AutoModelForCausalLM.from_pretrained("HuggingFaceH4/zephyr-7b-alpha")
|
53 |
|
54 |
+
|
55 |
self.text_splitter = RecursiveCharacterTextSplitter(chunk_size=1024, chunk_overlap=100)
|
56 |
self.prompt = PromptTemplate.from_template(
|
57 |
"""
|