File size: 408 Bytes
030266f
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import gradio as gr
import modal

# Load your deployed Modal class
WhisperModel = modal.Cls.from_name("whisper-app", "WhisperModel")

# Define function to call remote transcribe
def transcribe_audio(url):
    instance = WhisperModel()  # creates an instance
    return instance.transcribe.remote(url)

# Launch Gradio UI
gr.Interface(fn=transcribe_audio, inputs="text", outputs="text").launch()