evanperez commited on
Commit
142f4f4
1 Parent(s): e9d361a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -16,6 +16,11 @@ import json
16
  #Sri Laxmi Youtube:https://www.youtube.com/watch?v=SkY2u4UUr6M&t=112s
17
  ###############
18
 
 
 
 
 
 
19
  st.set_page_config(page_title="Gemini RAG", layout="wide")
20
 
21
  # This is the first API key input; no need to repeat it in the main function.
 
16
  #Sri Laxmi Youtube:https://www.youtube.com/watch?v=SkY2u4UUr6M&t=112s
17
  ###############
18
 
19
+ #Model loading
20
+ tokenizer = RagTokenizer.from_pretrained("facebook/rag-token-nq")
21
+ retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=True)
22
+ model = RagTokenForGeneration.from_pretrained("facebook/rag-token-nq", retriever=retriever)
23
+
24
  st.set_page_config(page_title="Gemini RAG", layout="wide")
25
 
26
  # This is the first API key input; no need to repeat it in the main function.