Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,14 +21,12 @@ st.set_page_config(layout="wide")
|
|
| 21 |
GOOGLE_API_KEY=os.environ['GOOGLE_API_KEY']
|
| 22 |
|
| 23 |
st.title('Stock Market Insights')
|
| 24 |
-
st.
|
|
|
|
| 25 |
st.sidebar.info("Know more about [NSE Tickers](https://www.google.com/search?q=nse+tickers+list&sca_esv=a6c39f4d03c5324c&sca_upv=1&rlz=1C1GCEB_enIN1011IN1011&sxsrf=ADLYWILQPbew-0SrvUUWpI8Y29_uOOgbvA%3A1716470016765&ei=AEFPZp-zLvzHp84P_ZWtuA0&oq=NSE+Tickers+&gs_lp=Egxnd3Mtd2l6LXNlcnAiDE5TRSBUaWNrZXJzICoCCAAyBRAAGIAEMggQABgWGAoYHjIGEAAYFhgeMgYQABgWGB4yBhAAGBYYHjIGEAAYFhgeMgYQABgWGB4yBhAAGBYYHjILEAAYgAQYhgMYigUyCxAAGIAEGIYDGIoFSIIbUL0PWL0PcAF4AZABAJgB8QKgAfECqgEDMy0xuAEByAEA-AEBmAICoAKKA8ICChAAGLADGNYEGEeYAwCIBgGQBgiSBwUxLjMtMaAHtQU&sclient=gws-wiz-serp)")
|
| 26 |
|
| 27 |
st.sidebar.info("Know more about [Charts](https://chart-img.com/)")
|
| 28 |
-
st.sidebar.markdown("The App uses **Google Gemini API** for Text and Vision along with 🦜️🔗 LangChain")
|
| 29 |
-
st.sidebar.image("https://myndroot.com/wp-content/uploads/2023/12/Gemini-Dext.jpg",width =40)
|
| 30 |
ticker_user = st.text_input("Enter Ticker for NSE Stocks","")
|
| 31 |
-
|
| 32 |
gemini_embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
| 33 |
|
| 34 |
llm = ChatGoogleGenerativeAI(model="gemini-1.5-pro-latest",google_api_key = GOOGLE_API_KEY)
|
|
@@ -116,26 +114,3 @@ if ticker_user!="":
|
|
| 116 |
else:
|
| 117 |
st.warning(f"Failed to retrieve image. Status code: {response.status_code}")
|
| 118 |
st.warning("Response:", response.text)
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
# If there is no environment variable set for the API key, you can pass the API
|
| 127 |
-
# key to the parameter `google_api_key` of the `GoogleGenerativeAIEmbeddings`
|
| 128 |
-
# function: `google_api_key = "key"`.
|
| 129 |
-
|
| 130 |
-
# gemini_embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
| 131 |
-
|
| 132 |
-
# # Save to disk
|
| 133 |
-
# vectorstore = Chroma.from_documents(
|
| 134 |
-
# documents=docs, # Data
|
| 135 |
-
# embedding=gemini_embeddings, # Embedding model
|
| 136 |
-
# persist_directory="./chroma_db" # Directory to save data
|
| 137 |
-
# )
|
| 138 |
-
|
| 139 |
-
# vectorstore_disk = Chroma(
|
| 140 |
-
# persist_directory="./chroma_db", # Directory of db
|
| 141 |
-
# embedding_function=gemini_embeddings # Embedding model
|
|
|
|
| 21 |
GOOGLE_API_KEY=os.environ['GOOGLE_API_KEY']
|
| 22 |
|
| 23 |
st.title('Stock Market Insights')
|
| 24 |
+
st.sidebar.image("https://myndroot.com/wp-content/uploads/2023/12/Gemini-Dext.jpg",width =100)
|
| 25 |
+
st.sidebar.markdown("The App uses **Google Gemini API** for Text and Vision along with 🦜️🔗 LangChain")
|
| 26 |
st.sidebar.info("Know more about [NSE Tickers](https://www.google.com/search?q=nse+tickers+list&sca_esv=a6c39f4d03c5324c&sca_upv=1&rlz=1C1GCEB_enIN1011IN1011&sxsrf=ADLYWILQPbew-0SrvUUWpI8Y29_uOOgbvA%3A1716470016765&ei=AEFPZp-zLvzHp84P_ZWtuA0&oq=NSE+Tickers+&gs_lp=Egxnd3Mtd2l6LXNlcnAiDE5TRSBUaWNrZXJzICoCCAAyBRAAGIAEMggQABgWGAoYHjIGEAAYFhgeMgYQABgWGB4yBhAAGBYYHjIGEAAYFhgeMgYQABgWGB4yBhAAGBYYHjILEAAYgAQYhgMYigUyCxAAGIAEGIYDGIoFSIIbUL0PWL0PcAF4AZABAJgB8QKgAfECqgEDMy0xuAEByAEA-AEBmAICoAKKA8ICChAAGLADGNYEGEeYAwCIBgGQBgiSBwUxLjMtMaAHtQU&sclient=gws-wiz-serp)")
|
| 27 |
|
| 28 |
st.sidebar.info("Know more about [Charts](https://chart-img.com/)")
|
|
|
|
|
|
|
| 29 |
ticker_user = st.text_input("Enter Ticker for NSE Stocks","")
|
|
|
|
| 30 |
gemini_embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
| 31 |
|
| 32 |
llm = ChatGoogleGenerativeAI(model="gemini-1.5-pro-latest",google_api_key = GOOGLE_API_KEY)
|
|
|
|
| 114 |
else:
|
| 115 |
st.warning(f"Failed to retrieve image. Status code: {response.status_code}")
|
| 116 |
st.warning("Response:", response.text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|