MeiJuice commited on
Commit
0c8d486
·
1 Parent(s): 6889a60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -26,8 +26,8 @@ with gr.Blocks() as demo:
26
  """)
27
  t1 = gr.Textbox(lines=5, label='Text',
28
  value="Everything has its time and that time must be watched.")
29
- button1 = gr.Button("🤖 Predict!")
30
- label1 = gr.Textbox(lines=1, label='Predicted Label 🎃')
31
  score1 = gr.Textbox(lines=1, label='Prob')
32
  with gr.Tab("中文版"):
33
  gr.Markdown("""
@@ -35,8 +35,8 @@ with gr.Blocks() as demo:
35
  """)
36
  t2 = gr.Textbox(lines=5, label='文本',
37
  value="联邦学习(Federated learning)是在进行分布式机器学习的过程中,各参与方可借助其他参与方数据进行联合建模和使用模型。参与各方无需传递和共享原始数据资源,同时保护模型参数,即在数据不出本地的情况下,进行数据联合训练、联合应用,建立合法合规的机器学习模型,成为一种解决合作中数据隐私与数据共享矛盾的新路径,FL本质上承诺多方通过交换梯度而不是原始数据来联合训练模型。")
38
- button2 = gr.Button("🤖 预测!")
39
- label2 = gr.Textbox(lines=1, label='预测结果 🎃')
40
  score2 = gr.Textbox(lines=1, label='模型概率')
41
 
42
  button1.click(predict_en, inputs=[t1], outputs=[label1, score1], api_name='predict_en')
 
26
  """)
27
  t1 = gr.Textbox(lines=5, label='Text',
28
  value="Everything has its time and that time must be watched.")
29
+ button1 = gr.Button("Predict!")
30
+ label1 = gr.Textbox(lines=1, label='Predicted Label')
31
  score1 = gr.Textbox(lines=1, label='Prob')
32
  with gr.Tab("中文版"):
33
  gr.Markdown("""
 
35
  """)
36
  t2 = gr.Textbox(lines=5, label='文本',
37
  value="联邦学习(Federated learning)是在进行分布式机器学习的过程中,各参与方可借助其他参与方数据进行联合建模和使用模型。参与各方无需传递和共享原始数据资源,同时保护模型参数,即在数据不出本地的情况下,进行数据联合训练、联合应用,建立合法合规的机器学习模型,成为一种解决合作中数据隐私与数据共享矛盾的新路径,FL本质上承诺多方通过交换梯度而不是原始数据来联合训练模型。")
38
+ button2 = gr.Button("预测!")
39
+ label2 = gr.Textbox(lines=1, label='预测结果 ')
40
  score2 = gr.Textbox(lines=1, label='模型概率')
41
 
42
  button1.click(predict_en, inputs=[t1], outputs=[label1, score1], api_name='predict_en')