Spaces:
Running
on
Zero
Running
on
Zero
# Setup and load your keys | |
import os | |
from g4f import ChatCompletion | |
from google.colab import userdata | |
from pinecone import Pinecone | |
import pandas as pd | |
from datasets import Dataset | |
from sentence_transformers import SentenceTransformer | |
import gradio as gr | |
model_name = "BAAI/bge-m3" | |
# APIs personales | |
#PINECONE_ENVIRONMENT = us-east-1 | |
#PINECONE_API_KEY = 3a3e9022-381d-436e-84cb-ba93464d283e | |
os.environ["PINECONE_ENVIRONMENT"] = "us-east-1" | |
os.environ["PINECONE_API_KEY"] = "3a3e9022-381d-436e-84cb-ba93464d283e" | |
# Retrieve the Pinecone API key from the user | |
PINECONE_API_KEY = userdata.get("PINECONE_API_KEY") # Use the key you set in the secrets | |
PINECONE_ENVIRONMENT = "us-east-1" # Use the environment you set in the secrets | |
# Initialize Pinecone with the API key | |
pc = Pinecone(api_key=PINECONE_API_KEY) |