Spaces:
Sleeping
Sleeping
| import paddle | |
| print(paddle.__version__) | |
| from paddlenlp import Taskflow | |
| # schema = '情感倾向[正向,负向]' # Define the schema for sentence-level sentiment classification | |
| # ie = Taskflow('information_extraction') | |
| # ie.set_schema(schema) # Reset schema | |
| # print(ie('这个产品用起来真的很流畅,我非常喜欢')) | |
| def emo_analysize(text): | |
| print(text) | |
| senta = Taskflow("sentiment_analysis") | |
| result=senta(text) | |
| print(result) | |
| return result | |