Spaces:
Running
on
Zero
Running
on
Zero
File size: 812 Bytes
9be1c64 521ae0b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# 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) |