Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from langchain.chains.question_answering import load_qa_chain
|
|
9 |
from langchain.prompts import PromptTemplate
|
10 |
import os
|
11 |
import json
|
12 |
-
from transformers import
|
13 |
|
14 |
####CREDIT#####
|
15 |
#Credit to author (Sri Laxmi) of original code reference: SriLaxmi1993
|
@@ -17,10 +17,9 @@ from transformers import RagTokenizer, RagRetriever, RagTokenForGeneration
|
|
17 |
#Sri Laxmi Youtube:https://www.youtube.com/watch?v=SkY2u4UUr6M&t=112s
|
18 |
###############
|
19 |
os.system("pip install -r requirements.txt")
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
model = RagTokenForGeneration.from_pretrained("facebook/rag-token-nq", retriever=retriever)
|
24 |
|
25 |
st.set_page_config(page_title="Gemini RAG", layout="wide")
|
26 |
|
|
|
9 |
from langchain.prompts import PromptTemplate
|
10 |
import os
|
11 |
import json
|
12 |
+
from transformers import AutoTokenizer
|
13 |
|
14 |
####CREDIT#####
|
15 |
#Credit to author (Sri Laxmi) of original code reference: SriLaxmi1993
|
|
|
17 |
#Sri Laxmi Youtube:https://www.youtube.com/watch?v=SkY2u4UUr6M&t=112s
|
18 |
###############
|
19 |
os.system("pip install -r requirements.txt")
|
20 |
+
|
21 |
+
#Model
|
22 |
+
tokenizer = AutoTokenizer.from_pretrained("bofenghuang/vigogne-2-7b-chat")
|
|
|
23 |
|
24 |
st.set_page_config(page_title="Gemini RAG", layout="wide")
|
25 |
|