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%
Build a real-time event monitoring tool that connects to a Gradio application and tracks all events during prediction submissions, providing detailed progress information and logging capabilities.
Your tool should implement a function monitorGradioEvents that:
The function should:
@generates
/**
* Monitors all events during a Gradio prediction submission.
*
* @param {string} appReference - The Gradio app URL or Space name (e.g., "user/space-name")
* @param {string} endpoint - The endpoint name to call
* @param {any} inputData - The input data to submit to the endpoint
* @returns {Promise<Object>} Event summary containing:
* - eventCounts: Object with counts for each event type
* - statusHistory: Array of status change objects with timestamps
* - finalResult: The final prediction data
* - logs: Array of log messages
* - timing: Start and end timestamps
* @throws {Error} If connection fails or endpoint is invalid
*/
async function monitorGradioEvents(appReference, endpoint, inputData) {
// IMPLEMENTATION HERE
}
module.exports = {
monitorGradioEvents
};Provides the client library for connecting to and interacting with Gradio applications, including streaming event handling capabilities.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-gradio--clientevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10