thelou1s's picture
mod app.py with test.request_api
1bafed7
raw
history blame
741 Bytes
# import gradio as gr
#
# gr.Interface.load("models/MIT/ast-finetuned-audioset-10-10-0.4593").launch()
import gradio as gr
from test import request_api
import sys
import warnings
from fastapi import FastAPI
# ignore UserWarning
warnings.simplefilter("ignore", UserWarning)
from test import request_api
title = "MIT-AST test"
description = "An audio event classifier trained on the AudioSet dataset to predict audio events from the AudioSet ontology."
demo = gr.Interface(
request_api,
inputs=[
gr.inputs.Audio(type="filepath"),
],
outputs=['text'],
# examples=examples,
title=title,
description=description,
allow_flagging='never'
)
demo.launch(enable_queue=True, show_error=True, share=False)