iwan-space / app.py
IwanSumpena's picture
ud
a088ce1 verified
raw
history blame contribute delete
330 Bytes
import streamlit as st
from gliner import GLiNER
model = GLiNER.from_pretrained("urchade/gliner_multi")
text=st.text_area('enter some text!')
labels = ["person", "award", "date", "competitions", "teams"]
entities = model.predict_entities(text, labels)
for entity in entities:
print(entity["text"], "=>", entity["label"])