Bennie12 commited on
Commit
a1f6f42
Β·
verified Β·
1 Parent(s): efadcd3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,14 +20,14 @@ with gr.Blocks() as demo:
20
  gr.Markdown("## πŸ“© ι ζΈ¬θ©ι¨™θ¨Šζ― (ζ–‡ε­— + εœ–η‰‡)")
21
 
22
  with gr.Tab("文字預測"):
23
- text_inputs = gr.TextArea(label="θΌΈε…₯訊息"),
24
  mode_radio_1 = gr.Radio(choices=["cnn", "bert", "both"], label="εˆ†ζžζ¨‘εΌ", value="cnn")
25
  text_buotton = gr.Button("ι–‹ε§‹εˆ†ζž")
26
  text_result =[gr.Textbox(label = "εˆ€ζ–·η΅ζžœ"),gr.Textbox(label = "ε―η–‘εˆ†ζ•Έ"),gr.Textbox(label = "ε―η–‘θ©žε½™")]
27
  text_buotton.click(fn=predict_text, inputs=[text_inputs, mode_radio_1], outputs=text_result)
28
 
29
  with gr.Tab("εœ–η‰‡ι ζΈ¬"):
30
- image_inputs = gr.TextArea(label="δΈŠε‚³εœ–η‰‡"),
31
  mode_radio_2 = gr.Radio(choices=["cnn", "bert", "both"], label="εˆ†ζžζ¨‘εΌ", value="cnn")
32
  image_buotton = gr.Button("ι–‹ε§‹εˆ†ζž")
33
  image_result =[gr.Textbox(label = "εˆ€ζ–·η΅ζžœ"),gr.Textbox(label = "ε―η–‘εˆ†ζ•Έ"),gr.Textbox(label = "ε―η–‘θ©žε½™")]
 
20
  gr.Markdown("## πŸ“© ι ζΈ¬θ©ι¨™θ¨Šζ― (ζ–‡ε­— + εœ–η‰‡)")
21
 
22
  with gr.Tab("文字預測"):
23
+ text_inputs = gr.TextArea(label="θΌΈε…₯訊息")
24
  mode_radio_1 = gr.Radio(choices=["cnn", "bert", "both"], label="εˆ†ζžζ¨‘εΌ", value="cnn")
25
  text_buotton = gr.Button("ι–‹ε§‹εˆ†ζž")
26
  text_result =[gr.Textbox(label = "εˆ€ζ–·η΅ζžœ"),gr.Textbox(label = "ε―η–‘εˆ†ζ•Έ"),gr.Textbox(label = "ε―η–‘θ©žε½™")]
27
  text_buotton.click(fn=predict_text, inputs=[text_inputs, mode_radio_1], outputs=text_result)
28
 
29
  with gr.Tab("εœ–η‰‡ι ζΈ¬"):
30
+ image_inputs = gr.TextArea(label="δΈŠε‚³εœ–η‰‡")
31
  mode_radio_2 = gr.Radio(choices=["cnn", "bert", "both"], label="εˆ†ζžζ¨‘εΌ", value="cnn")
32
  image_buotton = gr.Button("ι–‹ε§‹εˆ†ζž")
33
  image_result =[gr.Textbox(label = "εˆ€ζ–·η΅ζžœ"),gr.Textbox(label = "ε―η–‘εˆ†ζ•Έ"),gr.Textbox(label = "ε―η–‘θ©žε½™")]