Spaces:
Sleeping
Sleeping
File size: 2,007 Bytes
553b44f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# API Documentation for `Lenylvt/Whisper_Timestamps_Remover-API`
This guide provides instructions for interacting with the Whisper Timestamps Remover API using Python and JavaScript.
## API Endpoint
This API is accessible via the `gradio_client` Python library [docs](https://www.gradio.app/guides/getting-started-with-the-python-client) or the `@gradio/client` JavaScript package [docs](https://www.gradio.app/guides/getting-started-with-the-js-client).
## Python Usage
### Step 1: Installation
Ensure you have the `gradio_client` library installed before proceeding.
```python
pip install gradio_client
```
### Step 2: Making a Request
Find the API endpoint relevant to the function you're interested in. Replace the placeholders in the code snippet below with your specific input data. If accessing a private Space, your Hugging Face token may be required.
**API Name**: `/predict`
```python
from gradio_client import Client
client = Client("Lenylvt/Whisper_Timestamps_Remover-API")
result = client.predict(
"Hello!!", # Input text as a string in 'text' Textbox component
api_name="/predict"
)
print(result)
```
**Return Type(s):**
- A `str` representing the processed output in the 'output' Textbox component.
## JavaScript Usage
### Step 1: Installation
First, make sure the `@gradio/client` package is installed in your project.
```bash
npm i -D @gradio/client
```
### Step 2: Making a Request
As in Python, locate the API endpoint for the functionality you need. Replace the placeholders with your data. Include your Hugging Face token if accessing a private Space.
**API Name**: `/predict`
```javascript
import { client } from "@gradio/client";
const app = await client("Lenylvt/Whisper_Timestamps_Remover-API");
const result = await app.predict("/predict", [
"Hello!!", // Input text as a string in 'text' Textbox component
]);
console.log(result.data);
```
**Return Type(s):**
- A `string` representing the processed output in the 'output' Textbox component. |