Spaces:
Sleeping
Sleeping
Download libs/transformer/get_transcript_gradio_api.py from minhpng/test_python: direct link, hf CLI and curl.
- Browser
- Download file 428 Bytes
-
https://huggingface.co/spaces/minhpng/test_python/resolve/c7b46d42657a5140bc33c87286f885ea7d58ec23/libs/transformer/get_transcript_gradio_api.py
- Command line
-
hf download hf://spaces/minhpng/test_python@c7b46d42657a5140bc33c87286f885ea7d58ec23/libs/transformer/get_transcript_gradio_api.py
-
curl -L -o get_transcript_gradio_api.py https://huggingface.co/spaces/minhpng/test_python/resolve/c7b46d42657a5140bc33c87286f885ea7d58ec23/libs/transformer/get_transcript_gradio_api.py
428 Bytes
| from gradio_client import Client, handle_file | |
| def api_gradio_transcribe(url: str): | |
| client = Client("hf-audio/whisper-large-v3-turbo") | |
| result = client.predict( | |
| inputs=handle_file(url), | |
| task="transcribe", | |
| api_name="/predict" | |
| ) | |
| return result | |
| # print(api_gradio_transcribe("https://static.langkingdom.com/user_playlist_practice_videos/937f2c1558c92a0ea81a6778c8426044.mov")) | |