Spaces:
Sleeping
Sleeping
Ishanpardeshi
commited on
Commit
•
9e1cfa4
1
Parent(s):
d48e859
Update app.py
Browse files
app.py
CHANGED
@@ -8,16 +8,19 @@ from langchain_google_genai import ChatGoogleGenerativeAI
|
|
8 |
from langchain.agents.agent_types import AgentType
|
9 |
from langchain_experimental.agents.agent_toolkits import create_csv_agent
|
10 |
|
|
|
|
|
|
|
11 |
# API keys-----------------move them to ENV
|
12 |
os.environ["OPENAI_API_KEY"] = "NA"
|
13 |
-
os.environ["GOOGLE_API_KEY"] =
|
14 |
|
15 |
# Load The Gemini model for LLM
|
16 |
llm = ChatGoogleGenerativeAI(
|
17 |
model="gemini-1.5-flash-latest",
|
18 |
verbose=True,
|
19 |
temperature=0.6, # high temp=high accuracy and low creativity
|
20 |
-
google_api_key=
|
21 |
)
|
22 |
|
23 |
#<-----------------------------Tools----------------------------------->
|
|
|
8 |
from langchain.agents.agent_types import AgentType
|
9 |
from langchain_experimental.agents.agent_toolkits import create_csv_agent
|
10 |
|
11 |
+
import os
|
12 |
+
API_KEY=os.getenv['GOOGLE_API_KEY']
|
13 |
+
|
14 |
# API keys-----------------move them to ENV
|
15 |
os.environ["OPENAI_API_KEY"] = "NA"
|
16 |
+
os.environ["GOOGLE_API_KEY"] = API_KEY
|
17 |
|
18 |
# Load The Gemini model for LLM
|
19 |
llm = ChatGoogleGenerativeAI(
|
20 |
model="gemini-1.5-flash-latest",
|
21 |
verbose=True,
|
22 |
temperature=0.6, # high temp=high accuracy and low creativity
|
23 |
+
google_api_key=API_KEY
|
24 |
)
|
25 |
|
26 |
#<-----------------------------Tools----------------------------------->
|