From 4f518fffa7d8f8f51c1cf704fe840eb1d09fd2c2 Mon Sep 17 00:00:00 2001 From: Mario Gonzalez Gil Date: Wed, 11 Oct 2023 16:13:52 +0200 Subject: [PATCH] Server funtional --- DownloadModels.py | 4 +++- main.py | 2 +- run.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/DownloadModels.py b/DownloadModels.py index 232a9ef..b8a8218 100644 --- a/DownloadModels.py +++ b/DownloadModels.py @@ -3,7 +3,9 @@ from sentence_transformers import SentenceTransformer # 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" # 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: modelST = SentenceTransformer(model) # Define the path where you want to save the model diff --git a/main.py b/main.py index d7c0b41..61b6f1d 100644 --- a/main.py +++ b/main.py @@ -91,7 +91,7 @@ def loadmodelEmb(model_name = "embeddings/all-MiniLM-L6-v2",model_kwargs = {'dev st = SentenceTransformer(model_name) return st -emb=loadmodelEmb() +#emb=loadmodelEmb() CUSTOM_PATH = "/angela" app = FastAPI() diff --git a/run.sh b/run.sh index 0b6293f..8556851 100644 --- a/run.sh +++ b/run.sh @@ -1 +1 @@ -uvicorn main:app --reload --port 7860 \ No newline at end of file +/home/mgil/.local/bin/uvicorn main:app --reload --port 7860