Spaces:
Running
Running
Commit
·
a504c96
1
Parent(s):
a845d96
Update page2.py
Browse files
page2.py
CHANGED
@@ -9,7 +9,8 @@ from langchain.chains import LLMChain
|
|
9 |
from langchain.prompts import PromptTemplate
|
10 |
from langchain.memory import ConversationBufferMemory
|
11 |
from langchain.memory.chat_message_histories import StreamlitChatMessageHistory
|
12 |
-
|
|
|
13 |
# Streamlit app
|
14 |
def image():
|
15 |
st.markdown("""
|
@@ -58,7 +59,7 @@ def image():
|
|
58 |
image_url = f"data:image/jpeg;base64,{image_base64}"
|
59 |
|
60 |
return image_url
|
61 |
-
apiKey =
|
62 |
|
63 |
llm = ChatGoogleGenerativeAI(model="gemini-pro-vision", google_api_key=apiKey)
|
64 |
|
|
|
9 |
from langchain.prompts import PromptTemplate
|
10 |
from langchain.memory import ConversationBufferMemory
|
11 |
from langchain.memory.chat_message_histories import StreamlitChatMessageHistory
|
12 |
+
import os
|
13 |
+
key = os.environ.getattribute("api_key")
|
14 |
# Streamlit app
|
15 |
def image():
|
16 |
st.markdown("""
|
|
|
59 |
image_url = f"data:image/jpeg;base64,{image_base64}"
|
60 |
|
61 |
return image_url
|
62 |
+
apiKey = key
|
63 |
|
64 |
llm = ChatGoogleGenerativeAI(model="gemini-pro-vision", google_api_key=apiKey)
|
65 |
|