Integrating Gradio Apps
In order to construct more interesting tools for monkeys to use, it is helpful to be able to integrate the modular tools you are already experimenting with. To that end...
"Using the gradio_client
library, we can easily use the Gradio as an API to transcribe audio files programmatically.
Here’s the entire code to do it:
from gradio_client import Client
client = Client("abidlabs/whisper")
client.predict("audio_sample.wav")
>> "This is a test of the whisper speech recognition model."
The Gradio client works with any hosted Gradio app, whether it be an image generator, a text summarizer, a stateful chatbot, a tax calculator, or anything else! The Gradio Client is mostly used with apps hosted on Hugging Face Spaces, but your app can be hosted anywhere, such as your own server.
Prerequisites: To use the Gradio client, you do not need to know the gradio
library in great detail. However, it is helpful to have general familiarity with Gradio’s concepts of input and output components." [1]