rajat5ranjan commited on
Commit
e8774d5
·
verified ·
1 Parent(s): 92b1dae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -20,9 +20,10 @@ GOOGLE_API_KEY=os.environ['GOOGLE_API_KEY']
20
 
21
  ticker_user = st.text_input("Enter Ticker","ADANIENT")
22
 
23
- url = f"https://www.google.com/finance/quote/{ticker_user}:NSE?hl=en"
 
24
 
25
- loader = WebBaseLoader(url)
26
  docs = loader.load()
27
 
28
  gemini_embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
@@ -35,10 +36,8 @@ llm_prompt_template = """You are an expert Stock Market Trader for stock market
35
  Based on the context below
36
  {context}, Summarize the stock based on Historical data based on fundamental, price, news, sentiment , any red flags and suggest rating of the Stock in a 1 to 10 Scale"""
37
 
38
- user_prompt = st.text_input("Enter Prompt",llm_prompt_template)
39
 
40
-
41
- st.write(user_prompt)
42
  llm_prompt = PromptTemplate.from_template(user_prompt)
43
 
44
  llm_chain = LLMChain(llm=llm,prompt=llm_prompt)
 
20
 
21
  ticker_user = st.text_input("Enter Ticker","ADANIENT")
22
 
23
+ url1 = f"https://www.google.com/finance/quote/{ticker_user}:NSE?hl=en"
24
+ url2 = f"https://in.tradingview.com/symbols/NSE-{ticker_user}/"
25
 
26
+ loader = WebBaseLoader([url1,url2])
27
  docs = loader.load()
28
 
29
  gemini_embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
 
36
  Based on the context below
37
  {context}, Summarize the stock based on Historical data based on fundamental, price, news, sentiment , any red flags and suggest rating of the Stock in a 1 to 10 Scale"""
38
 
39
+ user_prompt = st.text_area("Enter Prompt",llm_prompt_template)
40
 
 
 
41
  llm_prompt = PromptTemplate.from_template(user_prompt)
42
 
43
  llm_chain = LLMChain(llm=llm,prompt=llm_prompt)