Spaces:
Sleeping
Sleeping
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"]) | |