当前位置: 首页 > article >正文

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__ &#

http://www.kler.cn/a/557886.html

相关文章:

  • 豪越科技消防安全重点单位管理:从传统到数字化的跨越
  • (java/Spring boot)使用火山引擎官方推荐方法向大模型发送请求
  • editor.md编辑器,图片跨域上传,前后端分离
  • 洛谷 P1102 A-B 数对(详解)c++
  • C++——list模拟实现
  • 某生产制造集团管理流程优化项目成功案例纪实
  • QQ登录测试用例报告
  • uniapp小程序自定义日历(签到、补签功能)
  • 助力DeepSeek私有化部署服务:让企业AI落地更简单、更安全
  • 线性模型 - Softmax 回归
  • 每日一题——验证IP地址
  • 使用pyinstaller对gradio和chromadb进行打包
  • AI大模型-提示工程学习笔记13—自动提示工程师 (Automatic Prompt Engineer)
  • 数据结构、算法和STL简介 【复习笔记】
  • C++/JavaScript ⭐算法OJ⭐下一个排列
  • SAP任命Simon Davies为亚太区总裁,领导重组后的亚太地区业务
  • 第15届 蓝桥杯 C++编程青少组中/高级选拔赛 202401 真题答案及解析
  • 后渗透——Docker容器逃逸
  • 数据结构-图-找出星型图的中心节点
  • 深度学习驱动下的字符识别:挑战与创新