File size: 966 Bytes
f386ac7
 
9502701
f386ac7
 
39b2c32
 
e894078
f386ac7
d966745
 
32fa9b0
 
 
 
 
 
 
9502701
32fa9b0
 
 
 
 
 
 
 
 
 
 
e123a03
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
import gradio as gr
from gradio_client import Client

read_key = os.environ.get('HF_TOKEN', None)
uname = os.environ.get('uname', None)
pwd = os.environ.get('pwd', None)
client = Client("aaqibsaeed/WbjkkRJBPxkB", hf_token=read_key)

with gr.Blocks(title="Report Generation - EnvisionIO") as demo:
    description = "Report Generation - EnvisionIO"
    article = ""
    waveform_options=gr.WaveformOptions(
        waveform_color="#01C6FF",
        waveform_progress_color="#0066B4",
        skip_length=1,
        show_controls=False,
    )
    simple_transcribe = gr.Interface(fn=client.predict,
        description=description,
        article=article,
        inputs=[
            gr.Audio(sources=["upload"], type="filepath",
                    label="Input", waveform_options = waveform_options),
        ], outputs=[
            gr.Text(label="Report"),
        ],
    )

if __name__ == "__main__":
    demo.launch(show_api=False, auth=(uname, pwd))