Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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"
|
| 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 |
-
|
|
|
|
|
|
|
| 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'
|