Update app.py
Browse filesUpdated Pinecone credentialling and datasource name
app.py
CHANGED
@@ -16,13 +16,13 @@ import time # For delay during index readiness check
|
|
16 |
|
17 |
# Pinecone and OpenAI setup
|
18 |
pinecone_api_key = os.getenv("PINECONE_API_KEY")
|
19 |
-
openai.api_key = os.getenv("
|
20 |
|
21 |
# Initialize Pinecone client
|
22 |
pc = Pinecone(api_key=pinecone_api_key)
|
23 |
|
24 |
# Create or retrieve Pinecone index
|
25 |
-
index_name = "
|
26 |
dimension = 1536 # Adjust dimension to match OpenAI embeddings
|
27 |
|
28 |
if not pc.has_index(index_name):
|
@@ -107,7 +107,7 @@ def launch_bot():
|
|
107 |
|
108 |
# Left side content
|
109 |
with st.sidebar:
|
110 |
-
image = Image.open('
|
111 |
st.markdown(f"## Welcome to {cfg.title}\n\n"
|
112 |
f"This demo uses an AI organic farming expert and carefully curated library system to achieve greater accuracy in agronomics and agricultural methodology. Created by Copyleft Cultivars, a nonprofit, we hope you enjoy this beta-test early access version.\n\n")
|
113 |
|
|
|
16 |
|
17 |
# Pinecone and OpenAI setup
|
18 |
pinecone_api_key = os.getenv("PINECONE_API_KEY")
|
19 |
+
openai.api_key = os.getenv("OpenAI_API")
|
20 |
|
21 |
# Initialize Pinecone client
|
22 |
pc = Pinecone(api_key=pinecone_api_key)
|
23 |
|
24 |
# Create or retrieve Pinecone index
|
25 |
+
index_name = "fertilizer-formulation"
|
26 |
dimension = 1536 # Adjust dimension to match OpenAI embeddings
|
27 |
|
28 |
if not pc.has_index(index_name):
|
|
|
107 |
|
108 |
# Left side content
|
109 |
with st.sidebar:
|
110 |
+
image = Image.open('Vectara-logo.png')
|
111 |
st.markdown(f"## Welcome to {cfg.title}\n\n"
|
112 |
f"This demo uses an AI organic farming expert and carefully curated library system to achieve greater accuracy in agronomics and agricultural methodology. Created by Copyleft Cultivars, a nonprofit, we hope you enjoy this beta-test early access version.\n\n")
|
113 |
|