achuthc1298 commited on
Commit
1815f6c
·
verified ·
1 Parent(s): 376be32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -18,7 +18,7 @@ from llama_index.core.agent import ReActAgent
18
  def create_doc_tools(document_fp: str, doc_name: str, verbose: bool = True) -> Tuple[QueryEngineTool,]:
19
  documents = SimpleDirectoryReader(input_files=[document_fp]).load_data()
20
 
21
- Settings.llm = Groq(model="mixtral-8x7b-32768", api_key = apikey)
22
  Settings.embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-large-en-v1.5")
23
 
24
  load_dir_path = f"/home/user/app/agentic_index/{doc_name}"
@@ -52,7 +52,9 @@ def main():
52
  # API Key input
53
  apikey = st.text_input("Enter your Groq API Key", type="password")
54
 
55
- llm = Groq(model="mixtral-8x7b-32768", api_key = apikey)
 
 
56
 
57
  if apikey:
58
  directory = '/home/user/app/rag_docs_final_review_tex_merged'
 
18
  def create_doc_tools(document_fp: str, doc_name: str, verbose: bool = True) -> Tuple[QueryEngineTool,]:
19
  documents = SimpleDirectoryReader(input_files=[document_fp]).load_data()
20
 
21
+ Settings.llm = Groq(model="mixtral-8x7b-32768")
22
  Settings.embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-large-en-v1.5")
23
 
24
  load_dir_path = f"/home/user/app/agentic_index/{doc_name}"
 
52
  # API Key input
53
  apikey = st.text_input("Enter your Groq API Key", type="password")
54
 
55
+ os.environ["GROQ_API_KEY"] = apikey
56
+
57
+ llm = Groq(model="mixtral-8x7b-32768")
58
 
59
  if apikey:
60
  directory = '/home/user/app/rag_docs_final_review_tex_merged'