paddlenlp-demo / app.py
zhanglu's picture
Create new file
88840f6
raw
history blame contribute delete
303 Bytes
import streamlit as st
from pprint import pprint
from paddlenlp import Taskflow
text=st.text_area("enter some text!")
schema = ['时间', '选手', '赛事名称'] # Define the schema for entity extraction
ie = Taskflow('information_extraction', schema=schema)
if text:
out=ie(text)
st.json(out)