Spaces:
Runtime error
Runtime error
Create app.py
Browse files
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()
|