zxcgqq commited on
Commit
0ae20d5
·
1 Parent(s): 7f1f05b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,6 +1,7 @@
1
  # 导入gradio
2
  import gradio as gr
3
- from transformers import *
4
 
5
- # 通过Interface加载pipeline并启动服务
6
- gr.Interface.from_pipeline(pipeline("question-answering", model="uer/roberta-base-finetuned-dianping-chinese")).launch()
 
 
 
1
  # 导入gradio
2
  import gradio as gr
 
3
 
4
+ def greet(name):
5
+ return "Hello " + name + "!!"
6
+
7
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text")