sciencebeam_parser中/api/convert/的相关问题请教。
xf-zh opened this issue · 10 comments
你的第一个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 -
您好,很抱歉打扰您。我是在windows平台,闲置端口我测试了很多个,好像都不可以。不知道是不是环境依赖的问题。
你的conda create env那一步安装成功了吗?有可能是环境依赖!
前边的安装过程都是通过的。我再重新尝试安装一下看看~
你这个会不会是GPT-4的API Key没有呀?我看了下你是LLM的后台报错,不是PDF parser报错
我用的是3.5turbo的key。
@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这个值
它会出来一个类似https://xxx.gradio.live/的地址, 你可以暂时使用我的public地址https://255b538a2afb7882f3.gradio.live
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.
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