File size: 1,226 Bytes
10f417b
5e2bacf
 
10f417b
 
 
 
 
 
 
 
 
 
 
8d1b720
4117a0d
10f417b
5e2bacf
10f417b
 
 
8d1b720
10f417b
 
 
 
4117a0d
 
10f417b
 
 
8d1b720
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
32
33
import combine_modules
import gradio as gr

with gr.Blocks() as demo:
    gr.Markdown("Welcome to Bias Checking Demo !")
    with gr.Tab("Text"):
        text_input = gr.Textbox()
        text_output = gr.Textbox()
        text_output_interpret = gr.TextArea()
        text_button = gr.Button("Check Bias in your Text")
    
    with gr.Tab("Video"):
        vid_input = gr.Video()
        vid_output = gr.Textbox()
        vid_audio_stmt = gr.Textbox()
        vid_output_interpret = gr.TextArea()
        vid_button = gr.Button("Check Bias in your Video")

    with gr.Tab("Image"):
        img_input = gr.Image()
        img_output = gr.Textbox()
        img_gen_stmt = gr.Textbox()
        img_output_interpret = gr.TextArea()
        img_button = gr.Button("Check Bias in your Image")

    text_button.click(combine_modules.app_nlp_start, inputs=text_input, outputs=[text_output, text_output_interpret])
    vid_button.click(combine_modules.app_video_start, inputs=vid_input, outputs=[vid_output, vid_output_interpret, vid_audio_stmt])
    img_button.click(combine_modules.app_image_start, inputs=img_input, outputs=[img_output, img_output_interpret, img_gen_stmt])


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