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

client = Client("Remeinium/Embedding_Siyabasa")
result = client.predict(
	word1="අම්මා",
	word2="තාත්තා",
	api_name="/word_similarity"
)
print(json.dumps(result, indent=4))
Response format:
{
    "word1": "අම්මා",
    "word2": "තාත්තා",
    "similarity": 0.856234,
    "model": "UgannA_SiyabasaV2"
}

Accepts 2 parameters:

  1. word1 :string *Required
    The input value that is provided in the “Word 1” Textbox component.
  2. word2 : string *Required
    The input value that is provided in the “Word 2: Textbox component.

Returns 1 element

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