svsaurav95 commited on
Commit
04dff86
Β·
verified Β·
1 Parent(s): dfd7a98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,7 +12,7 @@ embedding_model = SentenceTransformer("all-MiniLM-L6-v2")
12
 
13
  try:
14
  llm = ChatGroq(temperature=0, model="llama3-70b-8192", api_key=GROQ_API_KEY)
15
- st.success("βœ… Groq LLM initialized successfully.")
16
  except Exception as e:
17
  st.error("❌ Failed to initialize Groq LLM.")
18
  traceback.print_exc()
@@ -82,15 +82,15 @@ def generate_response(user_query, company_ticker, mode, uploaded_file):
82
  return "Error generating response."
83
 
84
  st.title("πŸ“Š AI-Powered Financial Insights Chatbot")
85
- st.write("Upload financial reports or fetch live financial data to get AI-driven insights.")
86
 
87
 
88
  user_query = st.text_input("Enter your query:")
89
- company_ticker = st.text_input("Enter company ticker symbol (optional):")
90
  mode = st.radio("Select Mode:", ["PDF Upload Mode", "Live Data Mode"])
91
  uploaded_file = st.file_uploader("Upload PDF (Only for PDF Mode)", type=["pdf"])
92
 
93
- if st.button("Get Insights"):
94
  if mode == "PDF Upload Mode" and not uploaded_file:
95
  st.error("❌ Please upload a PDF file.")
96
  else:
 
12
 
13
  try:
14
  llm = ChatGroq(temperature=0, model="llama3-70b-8192", api_key=GROQ_API_KEY)
15
+ st.success("βœ… LLM initialized successfully. Using llama3-70b-8192")
16
  except Exception as e:
17
  st.error("❌ Failed to initialize Groq LLM.")
18
  traceback.print_exc()
 
82
  return "Error generating response."
83
 
84
  st.title("πŸ“Š AI-Powered Financial Insights Chatbot")
85
+ st.write("Upload financial reports or fetch live financial data ")
86
 
87
 
88
  user_query = st.text_input("Enter your query:")
89
+ company_ticker = st.text_input("Enter company ticker symbol")
90
  mode = st.radio("Select Mode:", ["PDF Upload Mode", "Live Data Mode"])
91
  uploaded_file = st.file_uploader("Upload PDF (Only for PDF Mode)", type=["pdf"])
92
 
93
+ if st.button("Analyze"):
94
  if mode == "PDF Upload Mode" and not uploaded_file:
95
  st.error("❌ Please upload a PDF file.")
96
  else: