Montazerh82 commited on
Commit
aae822c
·
1 Parent(s): 530fa59

Add application file

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ pipe = pipeline("token-classification",
5
+ model="HooshvareLab/albert-fa-zwnj-base-v2-ner")
6
+
7
+
8
+ def greet(name):
9
+ return pipe(name)
10
+
11
+
12
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
13
+ demo.launch()