Skip to content

Commit

Permalink
Trust remote code (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickschuchmann authored Sep 4, 2024
1 parent a02de08 commit e6d24ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class EmbeddingResponse(BaseModel):

@asynccontextmanager
async def lifespan(app: FastAPI):
models[model_name] = SentenceTransformer(model_name)
models[model_name] = SentenceTransformer(model_name, trust_remote_code=True)
yield


Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
fastapi
sentence-transformers==2.2.2
sentence-transformers==2.4.0
uvicorn[standard]
einops

0 comments on commit e6d24ba

Please sign in to comment.