C2MV commited on
Commit
521ae0b
1 Parent(s): 9be1c64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -6,4 +6,20 @@ from pinecone import Pinecone
6
  import pandas as pd
7
  from datasets import Dataset
8
  from sentence_transformers import SentenceTransformer
9
- import gradio as gr
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  import pandas as pd
7
  from datasets import Dataset
8
  from sentence_transformers import SentenceTransformer
9
+ import gradio as gr
10
+
11
+ model_name = "BAAI/bge-m3"
12
+
13
+ # APIs personales
14
+ #PINECONE_ENVIRONMENT = us-east-1
15
+ #PINECONE_API_KEY = 3a3e9022-381d-436e-84cb-ba93464d283e
16
+
17
+ os.environ["PINECONE_ENVIRONMENT"] = "us-east-1"
18
+ os.environ["PINECONE_API_KEY"] = "3a3e9022-381d-436e-84cb-ba93464d283e"
19
+
20
+ # Retrieve the Pinecone API key from the user
21
+ PINECONE_API_KEY = userdata.get("PINECONE_API_KEY") # Use the key you set in the secrets
22
+ PINECONE_ENVIRONMENT = "us-east-1" # Use the environment you set in the secrets
23
+
24
+ # Initialize Pinecone with the API key
25
+ pc = Pinecone(api_key=PINECONE_API_KEY)