evanperez commited on
Commit
8aba0b4
1 Parent(s): 784af29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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 RagTokenizer, RagRetriever, RagTokenForGeneration
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
- #Model loading
21
- tokenizer = RagTokenizer.from_pretrained("facebook/rag-token-nq")
22
- retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=True)
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