tharu22 commited on
Commit
385f9be
·
1 Parent(s): b73a849

model change

Browse files
Files changed (1) hide show
  1. main.py +2 -4
main.py CHANGED
@@ -2,15 +2,13 @@ from fastapi import FastAPI, HTTPException
2
  from pydantic import BaseModel
3
  from sentence_transformers import SentenceTransformer
4
  import numpy as np
5
- from huggingface_hub import hf_hub_download
6
- from huggingface_hub import HfApi, HfFolder, Repository, hf_hub_url, cached_download
7
 
8
  # Initialize the FastAPI app
9
  app = FastAPI()
10
 
11
  # Load the pre-trained SentenceTransformer model from Hugging Face
12
- #model = SentenceTransformer("//huggingface.co/spaces/Kabila22/Kabilan_embedding_1", trust_remote_code=True)
13
- model = hf_hub_download("Alibaba-NLP/gte-base-en-v1.5", trust_remote_code=True)
14
 
15
  # Define the request body schema
16
  class TextInput(BaseModel):
 
2
  from pydantic import BaseModel
3
  from sentence_transformers import SentenceTransformer
4
  import numpy as np
 
 
5
 
6
  # Initialize the FastAPI app
7
  app = FastAPI()
8
 
9
  # Load the pre-trained SentenceTransformer model from Hugging Face
10
+
11
+ model=SentenceTransformer("all-MiniLM-L6-V2")
12
 
13
  # Define the request body schema
14
  class TextInput(BaseModel):