CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-gradio--client

JavaScript and TypeScript client library for interacting with Gradio APIs, providing methods to connect to, submit predictions to, and manage connections with Gradio applications.

Overall
score

96%

Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how well the engineer uses the @gradio/client package to implement a sentiment analysis tool, specifically focusing on the proper usage of the Client class and the predict() method for making simple predictions to Gradio applications.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Client.connect() usage",
      "description": "Uses Client.connect() static method to establish connection to the Gradio application (not direct instantiation or other connection methods)",
      "max_score": 25
    },
    {
      "name": "predict() method call",
      "description": "Uses the predict() method on the connected client instance to make predictions (not submit(), component_server(), or other methods)",
      "max_score": 30
    },
    {
      "name": "Endpoint specification",
      "description": "Correctly specifies the endpoint when calling predict() using either endpoint name or numeric ID as the first parameter",
      "max_score": 15
    },
    {
      "name": "Data parameter format",
      "description": "Properly formats the input data as the second parameter to predict() (array or object format matching API requirements)",
      "max_score": 15
    },
    {
      "name": "Promise handling",
      "description": "Correctly handles the Promise returned by predict() using async/await or .then()/.catch() to access prediction results",
      "max_score": 10
    },
    {
      "name": "Error handling",
      "description": "Implements try/catch or error handlers for connection failures and prediction errors",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-gradio--client

tile.json