Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ class MatchRequest(BaseModel):
|
|
27 |
node_texts: List[str]
|
28 |
|
29 |
# Load models once at startup for performance
|
30 |
-
sim_model = SentenceTransformer(
|
31 |
nli_pipeline = pipeline("zero-shot-classification", model="roberta-large-mnli")
|
32 |
|
33 |
def match_image_to_node_conditional(image_description, image_url, node_texts, sim_threshold=0.8, nli_threshold=0.7):
|
|
|
27 |
node_texts: List[str]
|
28 |
|
29 |
# Load models once at startup for performance
|
30 |
+
sim_model = SentenceTransformer("sentence-transformers/all-mpnet-base-v2")
|
31 |
nli_pipeline = pipeline("zero-shot-classification", model="roberta-large-mnli")
|
32 |
|
33 |
def match_image_to_node_conditional(image_description, image_url, node_texts, sim_threshold=0.8, nli_threshold=0.7):
|