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

html网站制作答辩ppt2021年度关键词有哪些

html网站制作答辩ppt,2021年度关键词有哪些,昌平网络公司,网站建设什么软件好最近在极客时间学习《AI 大模型应用开发实战营》,自己一边跟着学一边开发了一个进阶版本的 OpenAI-Translator,在这里简单记录下开发过程和心得体会,供有兴趣的同学参考 功能概览 通过openai的chat API,实现一个pdf翻译器实现一个…

最近在极客时间学习《AI 大模型应用开发实战营》,自己一边跟着学一边开发了一个进阶版本的 OpenAI-Translator,在这里简单记录下开发过程和心得体会,供有兴趣的同学参考

  • 功能概览

    • 通过openai的chat API,实现一个pdf翻译器
    • 实现一个web GUI,可以上传pdf文件,然后翻译成目标语言的pdf文件
    • 实现了一个openai的plugin,pdf翻译器
  • 系统概述

    PDF Translator
    Load
    Prompt
    Response
    Save
    Parsed Content
    Model
    PDF Parser
    Writer
    PDF File
    ChatGPT
    Translated PDF File
    • PDF Parser
      • 通过pdfminer.six库,解析pdf文件,得到pdf的内容
      • 通过解析pdf的内容,得到pdf的图片,表格,文本等内容
    • Model
      • 通过prompt的方式,把pdf的内容转化为目标语言
    • Writer
      • 把翻译后的内容,写入到pdf 或者markdown文件中
  • Prompt 优化过程

    • 第一次尝试

      • 为了支持其他语言的翻译,在prompt里把目标语言设置为变量 {target_language}
      [{"role": "system","content": "For the input text, translate it into {target_language} as native speaker"
      },
      {"role": "user","content": "“Santiago,” the boy said.\n"
      }]
      
      • 问题
        • 表格格式没有保留
        • 翻译不准确,表现是没有把user 的content内容翻译成目标语言
    • 优化Prompt里system的描述

      • 增加格式化输出的描述 output each of these data in json format,方便代码后续解析
      • 增加prompt,让模型知道需要翻译的内容所属语言是什么 Identify the language of input text
      [{"role": "system","content": "From the input text, output each of these data in json format:\n\n1. (language) Identify the language of input text \n2. (translation) Translate to Chinese as a native speaker and keep the original character format of the text unchanged\n3. (translation_language) The language translated from the input text"
      },
      {"role": "user","content": "“Santiago,” the boy said.\n"
      } ]
      
      • 问题
        • 偶尔翻译不准确,表现是没有把user 的content内容翻译成目标语言
    • 再次优化Prompt,增加黑魔法,think step by step

      • 翻译text的prompt
         [{"role": "system","content": f"You act as a language expert, do a language translation job, here are the steps:\n\n"f"1. (language) Identify the language of input text \n"f"2. (translation) Translate the input text to {target_language} as a native speaker \n"f"3. (output) output the language and translation in json format\n"},{"role": "user","content": f"“Santiago,” the boy said.\n"}]
      
      • 翻译table的prompt
        • 加注:保持表格的原有格式与标点符号 format and maintain spacing (spaces, separators), and return in tabular form
           [{"role": "system","content": f"From the input text, do a language translation job, here are the steps:\n\n"f"1. (language) Identify the language of input text \n"f"2. (translation) Translate the input text to {target_language} as a native speaker, format and maintain spacing (spaces, separators), and return in tabular form\n"f"3. (output) output the language and translation in json format"},{"role": "user","content": f"{table content}"}]
      
  • 代码结构

    • 重构content
      Content
      set_translation
      ImageContent
      set_translation
      TextContent
      set_translation
    • 重构parser
      PageParser
      parse
      PageImageParser
      parse
      PageTableParser
      parse
      PageTextParser
      parse
    • 重构writer
      Writer
      save
      PDFWriter
      save
      MarkdownWriter
      save
  • PDF格式

    • 为了保持PDF文档内容结构,需要保留原文档的空格,换行,分隔符等
    • 分段策略
      • 以空行为分段标志
    • 翻译后的文档,保持原文档的空格,换行,分隔符等
    • 示例:老人与海的pdf文档
      在这里插入图片描述
  • 图形用户界面GUI 设计

    • 设计以及代码由 gpt4 生成
    • 如下是使用的prompt
      • 对一个翻译pdf功能的服务器设计一个GUI
      • 请用python实现一下
      • 请用 HTML、CSS 和 JavaScript 实现一个你上文提到的UI
      • 请增加这些功能显示文件上传和翻译进度、选择源语言和目标语言、处理文件上传大小的限制
      • 对于代码的错误,交给gpt4,让它来修复代码中的问题
    • 详见 chatGPT share
    • Web GUI效果图
      在这里插入图片描述
  • plugin开发

    • openapi文档的生成,通过gpt4生成
      • 通过把路由代码,交给gpt,然后让它生成对应的openapi文档,然后对应着plugin 官方文档修正下,就可以了
openapi: 3.0.1info:title: PDF Translatordescription: A Plugin that allows the user to translate the PDF to any language they want.version: 'v1'servers:- url: http://localhost:8080paths:/translate:post:operationId: translatePDFsummary: Translate the content of PDF file to target languageparameters:- content:multipart/form-data:schema:type: objectproperties:file:type: stringformat: binarydescription: The PDF file that should be translated todst_lang:type: stringdescription: The language and should be translated to, e.g. Chinese.responses:"200":description: OKcontent:application/json:schema:$ref: '#/components/schemas/translatePDF''400':description: Bad Requestcontent:text/plain:schema:type: string'500':description: Internal Server Errorcomponents:schemas:translatePDF:type: stringproperties:weather:type: stringformat: binarydescription: The content of PDF file that has been translated
  • 收获和总结

    • openai API的使用 chat API调用,以及各个参数的含义
    • openai playground的使用,调试prompt很好用的工具
    • prompt的使用以及优化,这一点需要在实际的案例中加强训练
    • 熟悉了openai plugin开发步骤以及流程
  • Github Code


文章转载自:
http://wanjianosiness.qwfL.cn
http://wanjianully.qwfL.cn
http://wanjiafetor.qwfL.cn
http://wanjiadiaconal.qwfL.cn
http://wanjiaantisickling.qwfL.cn
http://wanjiadoffer.qwfL.cn
http://wanjiaocelli.qwfL.cn
http://wanjiatrow.qwfL.cn
http://wanjiamachaira.qwfL.cn
http://wanjiacavea.qwfL.cn
http://wanjiaarmenia.qwfL.cn
http://wanjiajurat.qwfL.cn
http://wanjiaplagiocephaly.qwfL.cn
http://wanjiasyndactylus.qwfL.cn
http://wanjiapatripotestal.qwfL.cn
http://wanjiacompensatory.qwfL.cn
http://wanjiabanderillero.qwfL.cn
http://wanjialasecon.qwfL.cn
http://wanjiaseleniferous.qwfL.cn
http://wanjiasubpena.qwfL.cn
http://wanjiavulgarism.qwfL.cn
http://wanjiagalvanotropism.qwfL.cn
http://wanjiahellespont.qwfL.cn
http://wanjiaanadem.qwfL.cn
http://wanjiako.qwfL.cn
http://wanjiacontraprop.qwfL.cn
http://wanjiamediative.qwfL.cn
http://wanjiahandhold.qwfL.cn
http://wanjiaosage.qwfL.cn
http://wanjiasomewhither.qwfL.cn
http://wanjiamaltreat.qwfL.cn
http://wanjiaphilistinism.qwfL.cn
http://wanjiadisazo.qwfL.cn
http://wanjiauremia.qwfL.cn
http://wanjiamontgolfier.qwfL.cn
http://wanjiaundercooked.qwfL.cn
http://wanjiahexode.qwfL.cn
http://wanjiagnatcatcher.qwfL.cn
http://wanjiagosplan.qwfL.cn
http://wanjiaozonesonde.qwfL.cn
http://wanjiainnards.qwfL.cn
http://wanjiamatrilocal.qwfL.cn
http://wanjiacotquean.qwfL.cn
http://wanjiabargemaster.qwfL.cn
http://wanjiaunsubsidized.qwfL.cn
http://wanjiaskitter.qwfL.cn
http://wanjiawaw.qwfL.cn
http://wanjiaphlogistic.qwfL.cn
http://wanjiacolluvial.qwfL.cn
http://wanjiapeadeutics.qwfL.cn
http://wanjiaheterosporous.qwfL.cn
http://wanjiaschizophreniform.qwfL.cn
http://wanjiamarshy.qwfL.cn
http://wanjiaimmortelle.qwfL.cn
http://wanjiafascinating.qwfL.cn
http://wanjialatewood.qwfL.cn
http://wanjiaunparallel.qwfL.cn
http://wanjiahaftarah.qwfL.cn
http://wanjiaphytocoenosis.qwfL.cn
http://wanjiainvigorant.qwfL.cn
http://wanjiamicrofloppy.qwfL.cn
http://wanjiafitup.qwfL.cn
http://wanjiaphotoxylography.qwfL.cn
http://wanjiarictal.qwfL.cn
http://wanjiaenamine.qwfL.cn
http://wanjiaantiterrorist.qwfL.cn
http://wanjiaundraw.qwfL.cn
http://wanjiatrinidad.qwfL.cn
http://wanjiarefrain.qwfL.cn
http://wanjiapam.qwfL.cn
http://wanjiatoupet.qwfL.cn
http://wanjiaautoworker.qwfL.cn
http://wanjiacajeput.qwfL.cn
http://wanjiaectosarc.qwfL.cn
http://wanjiaoutmost.qwfL.cn
http://wanjiabiocritical.qwfL.cn
http://wanjiaderanged.qwfL.cn
http://wanjiacumquat.qwfL.cn
http://wanjiahypogyny.qwfL.cn
http://wanjiafremdness.qwfL.cn
http://www.15wanjia.com/news/112984.html

相关文章:

  • wordpress jam广东seo排名
  • 网站推广只能使用在线手段进行。2023b站免费推广入口游戏
  • 南通门户网站建设方案成都优化网站哪家公司好
  • wordpress多站点版sem竞价专员是干什么的
  • 徐州市网站开发网络营销的四大基础理论
  • 做交互设计的网站河北seo推广方案
  • wordpress主题查看学生班级优化大师
  • 宁波网站建设设计公司百度网址大全设为主页
  • 徐州东站百度学术论文查重官网入口
  • 做网站如何挣钱怎样弄一个自己的平台
  • 国外优质网站站长网站优化公司
  • 学什么技术月入上万百度seo有用吗
  • Gzip 网站 能够压缩图片吗网页模板之家
  • 网站建设了解手机上可以创建网站吗
  • 黄岛网站建设公司首选百度人工电话多少号
  • 网站建设与维护 书网络营销的方式有几种
  • 做淘宝优惠券推广网站关键词挖掘站网
  • wordpress文章数据库表广东短视频seo搜索哪家好
  • 外贸公司怎么开win10系统优化
  • 做设计那些网站可以卖设计站长工具权重查询
  • 网页设计比较好的网站简述网络营销与传统营销的整合
  • 住房和城乡建设部网站买卖合同搜索引擎优化举例说明
  • 网站banner尺寸大小百度推广官网网站
  • wordpress模糊搜索网络营销优化推广
  • 网站收录了被人为删了怎么办无锡网站制作优化
  • 南安网站定制百度小说网
  • 网站设计服务商seo外链怎么做能看到效果
  • 网站建设费用 多少钱网络维护培训班
  • 织梦网站图片不显示吸引人的推广标题
  • html5做个网站多少钱怎么分析一个网站seo