Welcome
There are 7 API endpoints that you can access.
Endpoints
/get_embedding
/word_similarity
/nearest_neighbors
/sentence_embedding
/sentence_similarity
/_index_upload
/_search_wrapper
Quick Start
- Install the python client (gradio docs) if you don’t already have it installed.
pip install gradio_client
- Here’s your first API call
from gradio_client import Client
client = Client("Remeinium/Embedding_Siyabasa")
result = client.predict(
word="අම්මා",
api_name="/get_embedding"
)
print(json.dumps(result, indent=4))
- Install the javascript client (docs) if you don’t already have it installed.
$ npm i -D @gradio/client
- Here’s your first API call
import { Client } from "@gradio/client";
const client = await Client.connect("Remeinium/Embedding_Siyabasa");
const result = await client.predict("/get_embedding", {
word: "අම්මා"
});
console.log(result.data);
curl -X POST https://remeinium-embedding-siyabasa.hf.space/gradio_api/call/get_embedding \
-H "Content-Type: application/json" \
-d '{"data": ["අම්මා"]}' | awk -F'"' '{ print $4}' | read EVENT_ID; \
curl -N https://remeinium-embedding-siyabasa.hf.space/gradio_api/call/get_embedding/$EVENT_ID
See detailed usage examplesGo to next Topic >