AI-ANK commited on
Commit
f7038a5
·
1 Parent(s): 4f5a895

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -26
app.py CHANGED
@@ -16,24 +16,6 @@ import datetime
16
  st.set_page_config(layout="wide")
17
  st.write("My version of ChatGPT vision. You can upload an image and start chatting with the LLM about the image")
18
 
19
- # Sidebar
20
- st.sidebar.markdown('## Created By')
21
- st.sidebar.markdown("""
22
- [Harshad Suryawanshi](https://www.linkedin.com/in/harshadsuryawanshi/)
23
- """)
24
-
25
- st.sidebar.markdown('## Other Projects')
26
- st.sidebar.markdown("""
27
- - [AI Equity Research Analyst](https://ai-eqty-rsrch-anlyst.streamlit.app/)
28
- - [Recasting "The Office" Scene](https://blackmirroroffice.streamlit.app/)
29
- - [Story Generator](https://appstorycombined-agaf9j4ceit.streamlit.app/)
30
- """)
31
-
32
- st.sidebar.markdown('## Disclaimer')
33
- st.sidebar.markdown("""
34
- This application is a conceptual prototype created to demonstrate the potential of Large Language Models (LLMs) in generating equity research reports. The contents generated by this application are purely illustrative and should not be construed as financial advice, endorsements, or recommendations. The author and the application do not provide any guarantee regarding the accuracy, completeness, or timeliness of the information provided.
35
- """)
36
-
37
  # Initialize the cookie manager
38
  cookie_manager = stx.CookieManager()
39
 
@@ -113,7 +95,7 @@ else:
113
  st.write("Image Uploaded Successfully. Ask me anything about it.")
114
 
115
  # Initialize the chat engine with the image description.
116
- chat_engine = create_chat_engine(img_desc, os.environ["GOOGLE_API_KEY"])
117
 
118
  # Initialize session state for messages if it doesn't exist
119
  if "messages" not in st.session_state:
@@ -156,10 +138,3 @@ else:
156
  # Increment the message count and update the cookie
157
  message_count += 1
158
  cookie_manager.set('message_count', str(message_count), expires_at=datetime.datetime.now() + datetime.timedelta(days=30))
159
-
160
-
161
-
162
-
163
- # Set Replicate and Google API keys
164
- os.environ['REPLICATE_API_TOKEN'] = st.secrets['REPLICATE_API_TOKEN']
165
- os.environ["GOOGLE_API_KEY"] = st.secrets['GOOGLE_API_KEY']
 
16
  st.set_page_config(layout="wide")
17
  st.write("My version of ChatGPT vision. You can upload an image and start chatting with the LLM about the image")
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  # Initialize the cookie manager
20
  cookie_manager = stx.CookieManager()
21
 
 
95
  st.write("Image Uploaded Successfully. Ask me anything about it.")
96
 
97
  # Initialize the chat engine with the image description.
98
+ chat_engine = create_chat_engine(img_desc, st.secrets['GOOGLE_API_KEY'])
99
 
100
  # Initialize session state for messages if it doesn't exist
101
  if "messages" not in st.session_state:
 
138
  # Increment the message count and update the cookie
139
  message_count += 1
140
  cookie_manager.set('message_count', str(message_count), expires_at=datetime.datetime.now() + datetime.timedelta(days=30))