futranbg commited on
Commit
3a7803b
·
verified ·
1 Parent(s): 40dc9ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ app = FastAPI()
14
  # Check for GPU and load model accordingly
15
  device = "cuda" if torch.cuda.is_available() else "cpu"
16
  model_name = os.getenv("MODEL_NAME")
17
- model = SentenceTransformer(model_name, device=device)
18
 
19
  # Define the embedding endpoint
20
  @app.post("/embed")
 
14
  # Check for GPU and load model accordingly
15
  device = "cuda" if torch.cuda.is_available() else "cpu"
16
  model_name = os.getenv("MODEL_NAME")
17
+ model = SentenceTransformer(model_name, device=device, trust_remote_code=True)
18
 
19
  # Define the embedding endpoint
20
  @app.post("/embed")