aimaswx commited on
Commit
9fa8f6d
1 Parent(s): c59e84b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ # 导入gradio
2
+ import gradio as gr
3
+ # 导入transformers相关包
4
+ from transformers import *
5
+
6
+ # 通过Interface加载pipeline并启动服务
7
+ gr.Interface.from_pipeline(pipeline("text-classification", model="uer/roberta-base-finetuned-dianping-chinese")).launch()