Spaces:
Runtime error
Runtime error
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) | |