rajat5ranjan commited on
Commit
eec10f6
·
verified ·
1 Parent(s): 2235014

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ ticker_user = st.text_input("Enter Ticker for NSE Stocks","")
26
  gemini_embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
27
 
28
  llm = ChatGoogleGenerativeAI(model="gemini-1.5-pro-latest",google_api_key = GOOGLE_API_KEY)
29
-
30
  if ticker_user!="":
31
  url1 = f"https://www.google.com/finance/quote/{ticker_user}:NSE?hl=en"
32
  url2 = f"https://in.tradingview.com/symbols/NSE-{ticker_user}/"
@@ -107,7 +107,7 @@ if ticker_user!="":
107
  {"type": "image_url", "image_url": "chart_t1.jpg"},
108
  ]
109
  )
110
- message = llm.invoke([hmessage])
111
 
112
  st.write(message.content)
113
  st.write(res["output_text"])
 
26
  gemini_embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
27
 
28
  llm = ChatGoogleGenerativeAI(model="gemini-1.5-pro-latest",google_api_key = GOOGLE_API_KEY)
29
+ llm_vis = ChatGoogleGenerativeAI(model="gemini-pro-vision",google_api_key = GOOGLE_API_KEY)
30
  if ticker_user!="":
31
  url1 = f"https://www.google.com/finance/quote/{ticker_user}:NSE?hl=en"
32
  url2 = f"https://in.tradingview.com/symbols/NSE-{ticker_user}/"
 
107
  {"type": "image_url", "image_url": "chart_t1.jpg"},
108
  ]
109
  )
110
+ message = llm_vis.invoke([hmessage])
111
 
112
  st.write(message.content)
113
  st.write(res["output_text"])