Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|