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()