Kushwanth Chowday Kandala commited on
Commit
2376b2f
1 Parent(s): 11bc07e

NameError: name 'Pinecone' is not defined

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -42,10 +42,10 @@ PINECONE_API_KEY=os.getenv("PINECONE_API_KEY")
42
  PINECONE_ENV=os.getenv("PINECONE_ENV")
43
  PINECONE_ENVIRONMENT=os.getenv("PINECONE_ENVIRONMENT")
44
 
45
- pc = Pinecone( api_key=os.environ.get("PINECONE_API_KEY") ) # Now do stuff if 'my_index' not in pc.list_indexes().names(): pc.create_index( name='my_index', dimension=1536, metric='euclidean', spec=ServerlessSpec( cloud='aws', region='us-west-2' ) )
46
 
47
  def connect_pinecone():
48
- pinecone = Pinecone(api_key=PINECONE_API_KEY, environment=PINECONE_ENV)
49
  st.code(pinecone)
50
  st.divider()
51
  st.text(pinecone.list_indexes().names())
 
42
  PINECONE_ENV=os.getenv("PINECONE_ENV")
43
  PINECONE_ENVIRONMENT=os.getenv("PINECONE_ENVIRONMENT")
44
 
45
+ pc = PineconeGRPC( api_key=os.environ.get("PINECONE_API_KEY") ) # Now do stuff if 'my_index' not in pc.list_indexes().names(): pc.create_index( name='my_index', dimension=1536, metric='euclidean', spec=ServerlessSpec( cloud='aws', region='us-west-2' ) )
46
 
47
  def connect_pinecone():
48
+ pinecone = PineconeGRPC(api_key=PINECONE_API_KEY, environment=PINECONE_ENV)
49
  st.code(pinecone)
50
  st.divider()
51
  st.text(pinecone.list_indexes().names())