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

client = Client("Remeinium/Embedding_Siyabasa")
result = client.predict(
    word="අම්මා",
    api_name="/get_embedding"
)
print(json.dumps(result, indent=4))
Response format:
{
    "text": "අම්මා",
    "embedding": [0.123, -0.456, 0.789, ...],
    "dimensions": 300,
    "model": "UgannA_SiyabasaV2",
    "language": "Sinhala"
}

Accepts 1 parameter:

  • word : string *Required
  • The input value that is provided in the “Sinhala Word” Textbox component.

Returns 1 element

  • str | float | bool | list | dict
  • The output value that appears in the “Embedding Vector” Json component.