DexterSptizu commited on
Commit
cfe8e38
1 Parent(s): c780e69

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -18,10 +18,8 @@ def calculate_similarities(sentence1, sentence2):
18
  tfidf_matrix = tfidf_vectorizer.fit_transform([sentence1, sentence2])
19
  tfidf_score = cosine_similarity(tfidf_matrix[0:1], tfidf_matrix[1:2])[0][0]
20
 
21
- return {
22
- "WordLlama Similarity": float(wordllama_score),
23
- "TF-IDF Similarity": float(tfidf_score)
24
- }
25
 
26
  # Extended examples with more diverse sentences
27
  examples = [
 
18
  tfidf_matrix = tfidf_vectorizer.fit_transform([sentence1, sentence2])
19
  tfidf_score = cosine_similarity(tfidf_matrix[0:1], tfidf_matrix[1:2])[0][0]
20
 
21
+ # Return two separate values instead of a dictionary
22
+ return float(wordllama_score), float(tfidf_score)
 
 
23
 
24
  # Extended examples with more diverse sentences
25
  examples = [