zhanglu commited on
Commit
88840f6
1 Parent(s): f87e9da

Create new file

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from pprint import pprint
3
+ from paddlenlp import Taskflow
4
+
5
+ text=st.text_area("enter some text!")
6
+ schema = ['时间', '选手', '赛事名称'] # Define the schema for entity extraction
7
+ ie = Taskflow('information_extraction', schema=schema)
8
+ if text:
9
+ out=ie(text)
10
+ st.json(out)
11
+