Spaces:
Runtime error
Runtime error
Commit
•
b6aa4bf
1
Parent(s):
259615a
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from transformers import pipeline
|
|
3 |
|
4 |
pipeline = pipeline("feature-extraction", model="WhereIsAI/UAE-Large-V1")
|
5 |
|
6 |
-
def
|
7 |
title_embedding = pipeline(text)
|
8 |
term_embedding = pipeline('multivitamin for men')
|
9 |
semantic_score = cosine_similarity(title_embedding.flatten(), term_embedding.flatten()) * 100
|
|
|
3 |
|
4 |
pipeline = pipeline("feature-extraction", model="WhereIsAI/UAE-Large-V1")
|
5 |
|
6 |
+
def predict(text):
|
7 |
title_embedding = pipeline(text)
|
8 |
term_embedding = pipeline('multivitamin for men')
|
9 |
semantic_score = cosine_similarity(title_embedding.flatten(), term_embedding.flatten()) * 100
|