Weixin-Liang / LLM-scientific-feedback

Can large language models provide useful feedback on research papers? A large-scale empirical analysis.
Creative Commons Attribution 4.0 International
489 stars 49 forks source link

sciencebeam_parser中/api/convert/的相关问题请教。 #3

Closed xf-zh closed 10 months ago

xf-zh commented 11 months ago

环境配置没有问题,也都可以正常运行。在upload完pdf文件之后,点击submit会就出现和convert api无法通信的问题。导致无法回传pdf的xml变量。 下图是step1_get_xml函数运行之后xml的结果,显示无法与convert api通信。不知道这个是我个人pc的原因,还是服务器的问题? image 下图是sciencebeam_parser.service.server后台运行报错。 image

hiyin commented 11 months ago

你的第一个convert api不要deploy在默认的8080端口,我试了下8080有其他的在运行一般在Linux服务器上,你可以改成7070,然后在main.py里也在这行 convert_url = "http://localhost:8080/api/convert" 改为 convert_url = "http://localhost:7070/api/convert"

成功后你可以看到parse PDF的很多消息

比如,以下是成功parse你上传的PDF的消息 [2023-10-07 14:34:31,347] INFO in sciencebeam_parser.document.tei_document:54: generating tei document [2023-10-07 14:34:31,348] INFO in sciencebeam_parser.document.tei_document:59: generating tei document: front [2023-10-07 14:34:31,354] WARNING in sciencebeam_parser.document.tei.author:121: affiliation not found for marker: '12' [2023-10-07 14:34:31,354] WARNING in sciencebeam_parser.document.tei.author:121: affiliation not found for marker: '^' [2023-10-07 14:34:31,355] WARNING in sciencebeam_parser.document.tei.author:121: affiliation not found for marker: '^' [2023-10-07 14:34:31,356] WARNING in sciencebeam_parser.document.tei.author:121: affiliation not found for marker: '12' [2023-10-07 14:34:31,356] WARNING in sciencebeam_parser.document.tei.author:121: affiliation not found for marker: '^' [2023-10-07 14:34:31,356] WARNING in sciencebeam_parser.document.tei.author:121: affiliation not found for marker: '12' [2023-10-07 14:34:31,360] INFO in sciencebeam_parser.document.tei_document:112: generating tei document: body [2023-10-07 14:34:31,444] INFO in sciencebeam_parser.document.tei_document:131: generating tei document: back section [2023-10-07 14:34:31,445] INFO in sciencebeam_parser.document.tei_document:164: generating tei document done, took: front: 0.012308s, body: 0.084879s, back: 0.000644s, total: 0.097831s [2023-10-07 14:34:31,447] INFO in sciencebeam_parser.app.parser:291: tei to jats, took=0.001s [2023-10-07 14:34:31,447] INFO in sciencebeam_parser.app.parser:302: serializing xml, took=0.000s [2023-10-07 14:34:31,450] INFO in werkzeug:224: 127.0.0.1 - - [07/Oct/2023 14:34:31] "POST /api/convert HTTP/1.1" 200 -

xf-zh commented 11 months ago

您好,很抱歉打扰您。我是在windows平台,闲置端口我测试了很多个,好像都不可以。不知道是不是环境依赖的问题。

hiyin commented 11 months ago

你的conda create env那一步安装成功了吗?有可能是环境依赖!

xf-zh commented 11 months ago

前边的安装过程都是通过的。我再重新尝试安装一下看看~

hiyin commented 11 months ago

你这个会不会是GPT-4的API Key没有呀?我看了下你是LLM的后台报错,不是PDF parser报错

xf-zh commented 11 months ago

我用的是3.5turbo的key。

hiyin commented 11 months ago

@xf-zh 你试下把main.py里的demo.launch(server_name="0.0.0.0", server_port=7799) 改成demo.launch(server_name="0.0.0.0", server_port=7799, share=TRUE),加了share=TRUE这个值

hiyin commented 11 months ago

它会出来一个类似https://xxx.gradio.live/的地址, 你可以暂时使用我的public地址https://255b538a2afb7882f3.gradio.live

yuhui-zh15 commented 10 months ago

Thanks for your interest in our system. Seems you are using Windows system. Unfortunately ScienceBeam only supports Linux. Let us know if you find a way to install ScienceBeam on other systems.

yuhui-zh15 commented 10 months ago

We now added a new system that supports texts as input:

Usage:

python main_from_text.py  # If you are using non-linux operating systems or want to generate feedback from the parsed paper in text format