直接看结果: 代码:
import re
from collections import defaultdict
import random
import matplotlib.pyplot as plt
import numpy as npimport pandas as pd
import numpy as np
import re
from sklearn.feature_extraction.text import CountVectorizer
from nltk.corpus…
import torch
import torch.nn as nn
from transformers import BertModel, BertTokenizer# 通过torch.hub(pytorch中专注于迁移学的工具)获得已经训练好的bert-base-chinese模型
# model torch.hub.load(huggingface/pytorch-transformers, model, bert-base-chinese)
model…
报错信息
The field file exceeds its maximum permitted size of 1048576 bytes原因是 SpringBoot内嵌的 tomcat 默认的所有上传的文件大小为 1MB
解决办法
修改配置
spring:servlet:multipart:max-file-size: 50MBmax-request-size: 50MB或者
spring.servlet.multipart.…