File size: 669 Bytes
2990c51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import gradio as gr

from sentence_transformers import SentenceTransformer


def process(api, caption, category, asr, ocr):
    return api+caption+category+asr+ocr


with gr.Blocks() as demo:
    text_api = gr.Textbox(label='OpenAI API key')
    text_caption = gr.Textbox(label='Caption')
    text_category = gr.Textbox(label='Category')
    text_asr = gr.Textbox(label='ASR')
    text_ocr = gr.Textbox(label='OCR')

    text_output = gr.Textbox(value='', label='Output')

    btn = gr.Button(value='Submit')
    btn.click(process, inputs=[text_api, text_caption, text_category, text_asr, text_ocr], outputs=[text_output])


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