rairo commited on
Commit
69965ac
·
verified ·
1 Parent(s): 64f1383

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -1
main.py CHANGED
@@ -68,6 +68,8 @@ def home():
68
 
69
 
70
  llm = GoogleGemini(api_key=gemini_api_key)
 
 
71
 
72
  # Initialize Firebase app
73
  if not firebase_admin._apps:
@@ -138,7 +140,7 @@ def marketing_rec():
138
  prompt = PromptTemplate.from_template('You are a business analyst. Write some marketing tips suitable for a small mobile dashboard based on this transactions dataframe {data_frame}')
139
 
140
  # Create a chain that utilizes both the LLM and the prompt template
141
- chain = LLMChain(llm=llm, prompt=prompt, verbose=True)
142
  data_frame = transactions_df
143
  response = chain.invoke(input=data_frame)
144
  print(response)
 
68
 
69
 
70
  llm = GoogleGemini(api_key=gemini_api_key)
71
+
72
+ llm2 = ChatGoogleGenerativeAI(model='gemini-pro', temperature=0.6, api_key=gemini_api_key)
73
 
74
  # Initialize Firebase app
75
  if not firebase_admin._apps:
 
140
  prompt = PromptTemplate.from_template('You are a business analyst. Write some marketing tips suitable for a small mobile dashboard based on this transactions dataframe {data_frame}')
141
 
142
  # Create a chain that utilizes both the LLM and the prompt template
143
+ chain = LLMChain(llm=llm2, prompt=prompt, verbose=True)
144
  data_frame = transactions_df
145
  response = chain.invoke(input=data_frame)
146
  print(response)