Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -97,11 +97,6 @@ PINECONE_ENVIRONMENT = "asia-southeast1-gcp-free"
|
|
97 |
PINECONE_INDEX_NAME = "myindex-allminilm-l6-v2-384"
|
98 |
print(PINECONE_INDEX_NAME)
|
99 |
|
100 |
-
index_name = PINECONE_INDEX_NAME
|
101 |
-
print(index_name)
|
102 |
-
#namespace = random_string
|
103 |
-
namespace = "HF-GRADIO-0914"
|
104 |
-
|
105 |
#def exit_handler():
|
106 |
# pinecone.init(api_key=PINECONE_API_KEY, environment=PINECONE_ENVIRONMENT)
|
107 |
# index_namespace_to_delete = pinecone.Index(index_name=index_name)
|
@@ -110,8 +105,13 @@ namespace = "HF-GRADIO-0914"
|
|
110 |
#atexit.register(exit_handler)
|
111 |
|
112 |
pinecone.init(api_key=PINECONE_API_KEY, environment=PINECONE_ENVIRONMENT)
|
113 |
-
index_name =
|
114 |
print(index_name)
|
|
|
|
|
|
|
|
|
|
|
115 |
vector_db = Pinecone.from_texts(db_texts, hf_embeddings, index_name=index_name, namespace=namespace)
|
116 |
|
117 |
#Considering Python apps automatically execute codes, a Vector-DB should have been created under namespace = "HF-GRADIO-0909"
|
|
|
97 |
PINECONE_INDEX_NAME = "myindex-allminilm-l6-v2-384"
|
98 |
print(PINECONE_INDEX_NAME)
|
99 |
|
|
|
|
|
|
|
|
|
|
|
100 |
#def exit_handler():
|
101 |
# pinecone.init(api_key=PINECONE_API_KEY, environment=PINECONE_ENVIRONMENT)
|
102 |
# index_namespace_to_delete = pinecone.Index(index_name=index_name)
|
|
|
105 |
#atexit.register(exit_handler)
|
106 |
|
107 |
pinecone.init(api_key=PINECONE_API_KEY, environment=PINECONE_ENVIRONMENT)
|
108 |
+
index_name = PINECONE_INDEX_NAME
|
109 |
print(index_name)
|
110 |
+
#namespace = random_string
|
111 |
+
namespace = random_string
|
112 |
+
#index_name = pinecone.Index(index_name)
|
113 |
+
print(namespace)
|
114 |
+
|
115 |
vector_db = Pinecone.from_texts(db_texts, hf_embeddings, index_name=index_name, namespace=namespace)
|
116 |
|
117 |
#Considering Python apps automatically execute codes, a Vector-DB should have been created under namespace = "HF-GRADIO-0909"
|