Spaces:
Sleeping
Sleeping
Update app/vectorizer.py
Browse files- app/vectorizer.py +4 -0
app/vectorizer.py
CHANGED
@@ -9,6 +9,10 @@ from pinecone import Pinecone, ServerlessSpec
|
|
9 |
# Disable parallelism for tokenizers
|
10 |
os.environ['TOKENIZERS_PARALLELISM'] = 'false'
|
11 |
|
|
|
|
|
|
|
|
|
12 |
# Configure logging
|
13 |
logging.basicConfig(level=logging.INFO)
|
14 |
logger = logging.getLogger(__name__)
|
|
|
9 |
# Disable parallelism for tokenizers
|
10 |
os.environ['TOKENIZERS_PARALLELISM'] = 'false'
|
11 |
|
12 |
+
# Ensure the cache directory exists
|
13 |
+
os.makedirs('/app/cache/hub', exist_ok=True)
|
14 |
+
os.environ['HF_HOME'] = '/app/cache/hub'
|
15 |
+
|
16 |
# Configure logging
|
17 |
logging.basicConfig(level=logging.INFO)
|
18 |
logger = logging.getLogger(__name__)
|