Solshine commited on
Commit
9bc6d59
·
verified ·
1 Parent(s): 2dbf80b

Update app.py

Browse files

Updated Pinecone credentialling and datasource name

Files changed (1) hide show
  1. app.py +3 -3
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("OPENAI_API_KEY")
20
 
21
  # Initialize Pinecone client
22
  pc = Pinecone(api_key=pinecone_api_key)
23
 
24
  # Create or retrieve Pinecone index
25
- index_name = "farming-assistant"
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('Pinecone-logo.png') # Update with appropriate logo
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