Skip to main content
  • Python
  • Javascript
  • cURL
Python example:
from gradio_client import Client

client = Client("Remeinium/Embedding_Siyabasa")
result = client.predict(
    sentence1="මම පාසලට යමි",
    sentence2="ඔහු පාසලට යයි",
    api_name="/sentence_similarity"
)
print(json.dumps(result, indent=4))
Response format:
{
    "sentence1": "මම පාසලට යමි",
    "sentence2": "ඔහු පාසලට යයි", 
    "similarity": 0.734567,
    "model": "UgannA_SiyabasaV2"
}

**\

Accepts 2 parameters:**
  1. sentence1 : str *Required
    The input value that is provided in the “Sentence A” Textbox component.
  2. sentence2 : str *Required
    The input value that is provided in the “Sentence B” Textbox component.

Returns 1 element

str | float | bool | list | dict
The output value that appears in the “Sentence Similarity” Json component.