File size: 303 Bytes
88840f6
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
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)