techysanoj commited on
Commit
7d0fb83
·
verified ·
1 Parent(s): 969981f

Create app.py

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
+ ner = pipeline(
5
+ "NER-indian",
6
+ model="techysanoj/fine-tuned-IndicNER",
7
+ aggregation_strategy="simple"
8
+ )
9
+
10
+ def predict(text):
11
+ return ner(text)
12
+
13
+ gr.Interface(fn=predict, inputs="text", outputs="json").launch()