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

网站和系统哪个好做海口建设

网站和系统哪个好做,海口建设,如何做Google外贸网站,服务商名称是什么意思5分钟开发一个AI论文抓取和ChatGPT提炼应用 第一步 点击“即刻开始” -选择模板 python -修改标题 “AIPaper”,项目标识“AIPaper”,点击“创建项目” 第二步 在编程区域右侧AI区域,输入框输入以下内容: 请根据下面的内容&…

5分钟开发一个AI论文抓取和ChatGPT提炼应用

第一步

在这里插入图片描述

  • 点击“即刻开始” -选择模板 python -修改标题 “AIPaper”,项目标识“AIPaper”,点击“创建项目”

第二步

在这里插入图片描述

  • 在编程区域右侧AI区域,输入框输入以下内容:
请根据下面的内容,用streamlit写一个抓取和显示https://arxiv.org/list/cs.AI/recent 最新ai论文的标题、摘要和pdf url的应用:arXiv is a project by the Cornell University Library that provides open access to 1,000,000+ articles in Physics, Mathematics, Computer Science, Quantitative Biology, Quantitative Finance, and Statistics.Usage
Installation
$ pip install arxiv
In your Python script, include the lineimport arxiv
Search
A Search specifies a search of arXiv's database.arxiv.Search(query: str = "",id_list: List[str] = [],max_results: float = float('inf'),sort_by: SortCriterion = SortCriterion.Relevance,sort_order: SortOrder = SortOrder.Descending
)
query: an arXiv query string. Advanced query formats are documented in the arXiv API User Manual.
id_list: list of arXiv record IDs (typically of the format "0710.5765v1"). See the arXiv API User's Manual for documentation of the interaction between query and id_list.
max_results: The maximum number of results to be returned in an execution of this search. To fetch every result available, set max_results=float('inf') (default); to fetch up to 10 results, set max_results=10. The API's limit is 300,000 results.
sort_by: The sort criterion for results: relevance, lastUpdatedDate, or submittedDate.
sort_order: The sort order for results: 'descending' or 'ascending'.
To fetch arXiv records matching a Search, use search.results() or (Client).results(search) to get a generator yielding Results.Example: fetching results
Print the titles fo the 10 most recent articles related to the keyword "quantum:"import arxivsearch = arxiv.Search(query = "quantum",max_results = 10,sort_by = arxiv.SortCriterion.SubmittedDate
)for result in search.results():print(result.title)
Fetch and print the title of the paper with ID "1605.08386v1:"import arxivsearch = arxiv.Search(id_list=["1605.08386v1"])
paper = next(search.results())
print(paper.title)
Result
The Result objects yielded by (Search).results() include metadata about each paper and some helper functions for downloading their content.The meaning of the underlying raw data is documented in the arXiv API User Manual: Details of Atom Results Returned.result.entry_id: A url http://arxiv.org/abs/{id}.
result.updated: When the result was last updated.
result.published: When the result was originally published.
result.title: The title of the result.
result.authors: The result's authors, as arxiv.Authors.
result.summary: The result abstract.
result.comment: The authors' comment if present.
result.journal_ref: A journal reference if present.
result.doi: A URL for the resolved DOI to an external resource if present.
result.primary_category: The result's primary arXiv category. See arXiv: Category Taxonomy.
result.categories: All of the result's categories. See arXiv: Category Taxonomy.
result.links: Up to three URLs associated with this result, as arxiv.Links.
result.pdf_url: A URL for the result's PDF if present. Note: this URL also appears among result.links.
They also expose helper methods for downloading papers: (Result).download_pdf() and (Result).download_source().

第三步

在这里插入图片描述

  • 打开左侧main.py文件,将AI区生成的代码插入到文件中。

第四步

在这里插入图片描述

  • 打开左侧文件”requirements.txt“,输入下面的两行,用来加载安装arxiv的api和inscode的chatgpt api包:
arxiv
inscode_api

在这里插入图片描述

  • 打开.inscode文件
  • 将第一行修改为:
run = "pip install -r requirements.txt;streamlit run main.py"

第五步

在这里插入图片描述

  • 打开"main.py"文件,在第三行添加:
from inscode_api.send_question import send_question 

用来加载inscode的chatgpt api

  • 倒数第二行添加
st.write(send_question("你是一名专业IT记者,把下面的论文内容变成50字的中文快讯:",result.summary))
  • 说明:send_question是调用chatgpt的函数,第一个参数是prompt,第二个参数是传递的内容。

  • 最终代码如下:

import streamlit as st
import arxiv
from inscode_api.send_question import send_question# 设置标题和页面描述
st.title('最新AI论文列表') 
st.write('这个应用程序使用arxiv API抓取最新的AI论文列表并显示它们的标题、摘要和PDF链接。')# 设置查询参数
search = arxiv.Search(query='cat:cs.AI', max_results=10, sort_by=arxiv.SortCriterion.SubmittedDate
)# 循环遍历结果并显示标题、摘要和PDF链接
for result in search.results():st.write('##', result.title)st.write(result.summary)st.write(send_question("你是一名专业IT记者,把下面的论文内容变成50字的中文快讯:",result.summary)) st.write('PDF链接:', result.pdf_url)

第六步

在这里插入图片描述

  • 点击顶部工具栏的绿色“run”按钮。
  • 运行成功后,右侧会显示一个网页,内容是最新的AI论文内容,以及中文的快讯摘要。
  • 然后你可以发布到社区或者进行部署
http://www.yayakq.cn/news/561147/

相关文章:

  • 优秀网站设计案例分析ppt哪个网站有免费空间
  • 电子商务网站建设的必要性php网站开发教程
  • dz 做企业网站谁可以教我做网站
  • 广东世纪达建设集团有限公司官方网站seo排名赚app
  • 嘉兴网站建设服务建网站要多少钱建一个网络平台需要多少钱
  • 网站做成微信小程序网站设计 教程
  • yy直播下载昆明百度seo
  • 网站制作要用哪些软件如何查一个网站的域名
  • 就业网站建设建设银行 网站设置密码
  • 网站制作费用 厦门网站开发中如何实现gps定位
  • 阿里云的wordpress站点地址写错网页技术开发设计
  • 企业营销型网站建设淘客推广平台排名
  • 网站建设策划包括哪些内容企业邮箱格式怎么注册
  • 卖房网站母亲节做什麽活动做的网站浏览器提示不安全问题
  • 合肥专业做网站公司哪家好江西seo
  • 怎样用编程语言做网站做网站职业咋样
  • html5 网站模版论坛网站论坛网站建设建设
  • 网站速度诊断 慢我想做个网站怎么做
  • 威海企业做网站哪家好做资源分享网站怎么样
  • 聊城做网站费用wordpress 4.7.2下载
  • 网站建设保密协议书学校要建个网站应该怎么做
  • 登不上学校的网站该怎么做北京自己怎么做网站
  • 做一个网站需要花费多少钱烟台网站设计单位
  • 网站平台建设经费预算网站背景全屏
  • 微网站 免费模板怎么更改wordpress
  • 太原企业网站制作沈阳网站排名公司
  • 竞价代运营公司怎么给网站做百度优化
  • 医院网站设计方案南宁网站建设liluokj
  • 凉山西昌网站建设公司门面网站设计
  • 南通网站建设方案服务珠海做公司网站