Omartificial-Intelligence-Space
commited on
Commit
•
a11557a
1
Parent(s):
bc8ca0c
update app.py
Browse files
app.py
CHANGED
@@ -23,10 +23,7 @@ def predict(sentence1, sentence2):
|
|
23 |
|
24 |
label_probs = {labels[i]: float(scores[i]) for i in range(len(labels))}
|
25 |
|
26 |
-
return
|
27 |
-
"Similarity Score": similarity_score.item(),
|
28 |
-
"Label Probabilities": label_probs
|
29 |
-
}
|
30 |
|
31 |
# Define inputs and outputs for Gradio interface
|
32 |
inputs = [
|
@@ -48,10 +45,10 @@ examples = [
|
|
48 |
gr.Interface(
|
49 |
fn=predict,
|
50 |
title="Arabic Sentence Similarity and NLI Classification",
|
51 |
-
description="Compute the semantic similarity and classify the relationship between two Arabic sentences using
|
52 |
inputs=inputs,
|
53 |
examples=examples,
|
54 |
outputs=outputs,
|
55 |
cache_examples=False,
|
56 |
-
article="OMER NACAR. Model from Hugging Face Hub: Omartificial-Intelligence-Space/Arabic-Nli-Matryoshka",
|
57 |
-
).launch(debug=True)
|
|
|
23 |
|
24 |
label_probs = {labels[i]: float(scores[i]) for i in range(len(labels))}
|
25 |
|
26 |
+
return similarity_score.item(), label_probs
|
|
|
|
|
|
|
27 |
|
28 |
# Define inputs and outputs for Gradio interface
|
29 |
inputs = [
|
|
|
45 |
gr.Interface(
|
46 |
fn=predict,
|
47 |
title="Arabic Sentence Similarity and NLI Classification",
|
48 |
+
description="Compute the semantic similarity and classify the relationship between two Arabic sentences using an Arabic Matryoshka Embedding model.",
|
49 |
inputs=inputs,
|
50 |
examples=examples,
|
51 |
outputs=outputs,
|
52 |
cache_examples=False,
|
53 |
+
article="Author: OMER NACAR. Model from Hugging Face Hub: Omartificial-Intelligence-Space/Arabic-Nli-Matryoshka",
|
54 |
+
).launch(debug=True, share=True)
|