File size: 476 Bytes
29b6b0b
efe17d8
 
 
e6838d8
efe17d8
 
 
 
 
 
 
134e994
 
efe17d8
30b88d0
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import spaces 
import gradio as gr
from inference import predict

@spaces.GPU
def predict_from_audio(audio):
    return predict(audio)["language"]

demo = gr.Interface(
    fn=predict_from_audio,
    inputs=gr.Audio(type="filepath"),
    outputs="label",
    title="Language Identification Model",
    description="A Malaysian Language Identification Model for Detecting English, Mandarin, Tamil, Malay, Iban, and Bukar Sadong."
)

if __name__ == "__main__":
    demo.launch()