Server funtional

This commit is contained in:
Mario Gonzalez Gil 2023-10-11 16:13:52 +02:00
parent f22df1a7cf
commit 4f518fffa7
3 changed files with 5 additions and 3 deletions

View File

@ -3,7 +3,9 @@ from sentence_transformers import SentenceTransformer
# uno de uso gereal el de mejor desempeño all-mpnet-base-v2 # uno de uso gereal el de mejor desempeño all-mpnet-base-v2
# el mas rapido "paraphrase-MiniLM-L3-v2" y "all-MiniLM-L6-v2" # el mas rapido "paraphrase-MiniLM-L3-v2" y "all-MiniLM-L6-v2"
# muy rappudo y muy acertado "all-MiniLM-L12-v2" # muy rappudo y muy acertado "all-MiniLM-L12-v2"
models=["all-MiniLM-L12-v2","paraphrase-MiniLM-L3-v2" , "all-MiniLM-L6-v2","all-mpnet-base-v2","multi-qa-mpnet-base-dot-v1"] #models=["all-MiniLM-L12-v2","paraphrase-MiniLM-L3-v2" , "all-MiniLM-L6-v2",
models=["all-mpnet-base-v2","multi-qa-mpnet-base-dot-v1"]
for model in models: for model in models:
modelST = SentenceTransformer(model) modelST = SentenceTransformer(model)
# Define the path where you want to save the model # Define the path where you want to save the model

View File

@ -91,7 +91,7 @@ def loadmodelEmb(model_name = "embeddings/all-MiniLM-L6-v2",model_kwargs = {'dev
st = SentenceTransformer(model_name) st = SentenceTransformer(model_name)
return st return st
emb=loadmodelEmb() #emb=loadmodelEmb()
CUSTOM_PATH = "/angela" CUSTOM_PATH = "/angela"
app = FastAPI() app = FastAPI()

2
run.sh
View File

@ -1 +1 @@
uvicorn main:app --reload --port 7860 /home/mgil/.local/bin/uvicorn main:app --reload --port 7860