File size: 730 Bytes
3435694
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
26
27
28
29
import os
import sys
from sentence_transformers import SentenceTransformer

print("Testing model loading...")

# Construct path
model_path = os.path.join(os.path.dirname(__file__), "..", "co_po_bloom_model_v3_finetuned")
model_path = os.path.abspath(model_path)
print(f"Target model path: {model_path}")

# Check if path exists
if os.path.exists(model_path):
    print(f"Path exists. Contents: {os.listdir(model_path)}")
else:
    print("Path does NOT exist!")

try:
    print("Attempting to load model...")
    model = SentenceTransformer(
        model_path,
        trust_remote_code=False
    )
    print("Success!")
except Exception as e:
    print(f"Error loading model: {e}")
    import traceback
    traceback.print_exc()