Bobotriere commited on
Commit
5ca5ab3
·
verified ·
1 Parent(s): 3dae07f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -1,10 +1,11 @@
1
  from gliner import GLiNER
2
  import gradio as gr
3
 
4
-
5
  model = GLiNER.from_pretrained("DeepMount00/GLiNER_PII_ITA")
6
 
7
-
8
  def predict(text):
9
- results = model.predict_entities(text, labels=None) # You can set specific labels if needed
10
- return str(results)
 
 
 
 
1
  from gliner import GLiNER
2
  import gradio as gr
3
 
 
4
  model = GLiNER.from_pretrained("DeepMount00/GLiNER_PII_ITA")
5
 
 
6
  def predict(text):
7
+ return model.predict_entities(text)
8
+
9
+ demo = gr.Interface(fn=predict, inputs="text", outputs="json", enable_queue=True)
10
+
11
+ demo.launch()