nlp 自然语言处理+bert model +问答系统 question answer system(python 完整代码)
pre-trained bert model 预训练好的Bert模型 本地实现问答系统
用这条命令将bert下载到本地: model.save_pretrained("path/to/model")
也有参考这篇文章 https://colab.research.google.com/drive/1uSlWtJdZmLrI3FCNIlUHFxwAJiSu2J0-#scrollTo=AaweLnNXGhTY
但是我的是本地的就可以运行的 他的只能用Google的后端
# This is a sample Python script.
# Press ⌃R to execute it or replace it with your code.
# Press Double ⇧ to search everywhere for classes, files, tool windows, actions, and settings.
import torch
# def print_hi(name):
# # Use a breakpoint in the code line below to debug your script.
# print(f'Hi, {name}') # Press ⌘F8 to toggle the breakpoint.
# Press the green button in the gutter to run the script.
if __name__ &#