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

client = Client("Remeinium/Embedding_Siyabasa")
result = client.predict(
    sentence="මම පාසලට යමි",
    api_name="/sentence_embedding"
)
print(json.dumps(result, indent=4))
Response format:
{
    "sentence": "මම පාසලට යමි",
    "embedding": [0.123, -0.456, 0.789, ...],
    "dimensions": 300,
    "tokens": ["මම", "පාසලට", "යමි"],
    "model": "UgannA_SiyabasaV2"
}

Accepts 1 parameter:

  • sentence : str *Required
    The input value that is provided in the “Sinhala Sentence” Textbox component.

Returns 1 element

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