Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import os
|
2 |
-
os.system('pip install pinecone pandas datasets sentence-transformers')
|
3 |
|
4 |
# Setup and load your keys
|
5 |
import os
|
6 |
-
|
7 |
#from google.colab import userdata
|
8 |
from pinecone import Pinecone
|
9 |
import pandas as pd
|
@@ -21,7 +21,7 @@ os.environ["PINECONE_ENVIRONMENT"] = "us-east-1"
|
|
21 |
os.environ["PINECONE_API_KEY"] = "3a3e9022-381d-436e-84cb-ba93464d283e"
|
22 |
|
23 |
# Retrieve the Pinecone API key from the user
|
24 |
-
PINECONE_API_KEY =
|
25 |
PINECONE_ENVIRONMENT = "us-east-1" # Use the environment you set in the secrets
|
26 |
|
27 |
# Initialize Pinecone with the API key
|
@@ -44,7 +44,7 @@ def print_current_selection():
|
|
44 |
INDEX_NAME = 'vestidos'
|
45 |
|
46 |
# Obtener la clave API de Pinecone
|
47 |
-
PINECONE_API_KEY = userdata.get('PINECONE_API_KEY')
|
48 |
|
49 |
def connect_to_pinecone(index_name):
|
50 |
global INDEX_NAME
|
@@ -79,7 +79,7 @@ if 'EMBED_MODEL' not in globals() or EMBED_MODEL is None:
|
|
79 |
raise ValueError("EMBED_MODEL is not set. Please select an embedding model first.")
|
80 |
|
81 |
# Inicializar cliente de Pinecone
|
82 |
-
PINECONE_API_KEY = userdata.get('PINECONE_API_KEY')
|
83 |
pc = Pinecone(api_key=PINECONE_API_KEY)
|
84 |
|
85 |
# Inicializar el índice de Pinecone
|
|
|
1 |
import os
|
2 |
+
os.system('pip install tqdm bitsandbytes tiktoken g4f pinecone-client pandas datasets sentence-transformers')
|
3 |
|
4 |
# Setup and load your keys
|
5 |
import os
|
6 |
+
from g4f import ChatCompletion
|
7 |
#from google.colab import userdata
|
8 |
from pinecone import Pinecone
|
9 |
import pandas as pd
|
|
|
21 |
os.environ["PINECONE_API_KEY"] = "3a3e9022-381d-436e-84cb-ba93464d283e"
|
22 |
|
23 |
# Retrieve the Pinecone API key from the user
|
24 |
+
PINECONE_API_KEY = "3a3e9022-381d-436e-84cb-ba93464d283e" # Use the key you set in the secrets
|
25 |
PINECONE_ENVIRONMENT = "us-east-1" # Use the environment you set in the secrets
|
26 |
|
27 |
# Initialize Pinecone with the API key
|
|
|
44 |
INDEX_NAME = 'vestidos'
|
45 |
|
46 |
# Obtener la clave API de Pinecone
|
47 |
+
#PINECONE_API_KEY = userdata.get('PINECONE_API_KEY')
|
48 |
|
49 |
def connect_to_pinecone(index_name):
|
50 |
global INDEX_NAME
|
|
|
79 |
raise ValueError("EMBED_MODEL is not set. Please select an embedding model first.")
|
80 |
|
81 |
# Inicializar cliente de Pinecone
|
82 |
+
#PINECONE_API_KEY = userdata.get('PINECONE_API_KEY')
|
83 |
pc = Pinecone(api_key=PINECONE_API_KEY)
|
84 |
|
85 |
# Inicializar el índice de Pinecone
|