Spaces:
Sleeping
Sleeping
andykr1k commited on
Commit ·
d0003e1
1
Parent(s): 675d01b
trying new config
Browse files
app.py
CHANGED
|
@@ -16,8 +16,6 @@ from apscheduler.schedulers.background import BackgroundScheduler
|
|
| 16 |
import math
|
| 17 |
from contextlib import asynccontextmanager # Import this for lifespan
|
| 18 |
|
| 19 |
-
os.environ["HF_HOME"] = "/home/user/huggingface"
|
| 20 |
-
|
| 21 |
# Configure logging
|
| 22 |
logging.basicConfig(level=logging.INFO)
|
| 23 |
logger = logging.getLogger(__name__)
|
|
@@ -42,7 +40,9 @@ user_interactions = defaultdict(set)
|
|
| 42 |
post_features = {}
|
| 43 |
post_metadata = {}
|
| 44 |
|
| 45 |
-
|
|
|
|
|
|
|
| 46 |
|
| 47 |
SUPABASE_URL = os.getenv('supabaseUrl')
|
| 48 |
SUPABASE_KEY = os.getenv('supabaseAnonKey')
|
|
|
|
| 16 |
import math
|
| 17 |
from contextlib import asynccontextmanager # Import this for lifespan
|
| 18 |
|
|
|
|
|
|
|
| 19 |
# Configure logging
|
| 20 |
logging.basicConfig(level=logging.INFO)
|
| 21 |
logger = logging.getLogger(__name__)
|
|
|
|
| 40 |
post_features = {}
|
| 41 |
post_metadata = {}
|
| 42 |
|
| 43 |
+
if not os.path.exists('/tmp/cache'):
|
| 44 |
+
os.makedirs('/tmp/cache')
|
| 45 |
+
sentence_model = SentenceTransformer('all-MiniLM-L6-v2', cache_folder='/tmp/cache')
|
| 46 |
|
| 47 |
SUPABASE_URL = os.getenv('supabaseUrl')
|
| 48 |
SUPABASE_KEY = os.getenv('supabaseAnonKey')
|