lllchenlll commited on
Commit
2990c51
·
1 Parent(s): 460cda3

Add application file

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ from sentence_transformers import SentenceTransformer
4
+
5
+
6
+ def process(api, caption, category, asr, ocr):
7
+ return api+caption+category+asr+ocr
8
+
9
+
10
+ with gr.Blocks() as demo:
11
+ text_api = gr.Textbox(label='OpenAI API key')
12
+ text_caption = gr.Textbox(label='Caption')
13
+ text_category = gr.Textbox(label='Category')
14
+ text_asr = gr.Textbox(label='ASR')
15
+ text_ocr = gr.Textbox(label='OCR')
16
+
17
+ text_output = gr.Textbox(value='', label='Output')
18
+
19
+ btn = gr.Button(value='Submit')
20
+ btn.click(process, inputs=[text_api, text_caption, text_category, text_asr, text_ocr], outputs=[text_output])
21
+
22
+
23
+ if __name__ == "__main__":
24
+ demo.launch()