You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/python3.10/dist-packages/paddlenlp/transformers/tokenizer_utils_base.py:1985: FutureWarning: The pad_to_max_length argument is deprecated and will be removed in a future version, use padding=True or padding='longest' to pad to the longest sequence in the batch, or use padding='max_length' to pad to a max length. In this case, you can give a specific length with max_length (e.g. max_length=45) or leave max_length to None to pad to the maximal input size of the model (e.g. 512 for Bert).
warnings.warn(
[{}]
代码如下
from paddlenlp import Taskflow
def uie_base(schema,text):
uie = Taskflow("information_extraction", schema=schema, model="uie-x-base")
result=uie(text)
return result
if name == 'main':
res=uie_base(
['题目'],
"""
2. 七年级(1)班同学开展了社会实践调查,
· 人们采集野生植物时掌握了一些可食用植物的生长规律,过实践,将它们培育为农作物。
· 人们开始将一些活的野兽或小动物图永起来,以备日后食用。
· 最初进行农业生产,主要是靠双手摇种和收获。后来人们仗用石刀等工具收割,用石磨盘加工
A. 家畜饲养的出现
B. 磨制石器的发展历程
C. 早期国家的出现
D. 原始农业的兴起发展
""")
print(res)
The text was updated successfully, but these errors were encountered:
请提出你的问题
错误信息如下
/usr/local/lib/python3.10/dist-packages/paddlenlp/transformers/tokenizer_utils_base.py:1985: FutureWarning: The
pad_to_max_length
argument is deprecated and will be removed in a future version, usepadding=True
orpadding='longest'
to pad to the longest sequence in the batch, or usepadding='max_length'
to pad to a max length. In this case, you can give a specific length withmax_length
(e.g.max_length=45
) or leave max_length to None to pad to the maximal input size of the model (e.g. 512 for Bert).warnings.warn(
[{}]
代码如下
from paddlenlp import Taskflow
def uie_base(schema,text):
uie = Taskflow("information_extraction", schema=schema, model="uie-x-base")
result=uie(text)
return result
if name == 'main':
res=uie_base(
['题目'],
"""
2. 七年级(1)班同学开展了社会实践调查,
· 人们采集野生植物时掌握了一些可食用植物的生长规律,过实践,将它们培育为农作物。
· 人们开始将一些活的野兽或小动物图永起来,以备日后食用。
· 最初进行农业生产,主要是靠双手摇种和收获。后来人们仗用石刀等工具收割,用石磨盘加工
A. 家畜饲养的出现
B. 磨制石器的发展历程
C. 早期国家的出现
D. 原始农业的兴起发展
""")
print(res)
The text was updated successfully, but these errors were encountered: