Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For anyone encounter installation, server and request. issues, please look here #4

Open
hiyin opened this issue Oct 7, 2023 · 21 comments

Comments

@hiyin
Copy link

hiyin commented Oct 7, 2023

I found this tool extremely helpful and fun to use! Thanks to the developers you are awesome! However I believe the repository needs some care afterwards to make the documentation more user-approachable and that users can run the tool smoothly. I am speaking from my own user experience.

Here is the tips how I setup mine and successfully running:

  1. Git clone the repo in a Linux machine! (No Mac) I used CenOS 7 in our school
  2. Make sure you use the GPT-4 API Key, it starts with sk-xxxxxxx... (for mainland users maybe try purchase it from some online e-commerce shop), because I used the GPT-3.5-turbo API key and the quote just exceeded with no reason whenever I run. Also don't forget to change GPT-3.5-turbo to GPT-4
    so your lines in main.py should be:
    def __init__(self, model_name="gpt-4"):
    wrapper = GPT4Wrapper(model_name="gpt-4")
  3. There is no <requirement.txt> but you only need 4 packages stated below to make the main.py work i.e.
    gradio
    pikepdf
    openai
    tiktoken
    (you can also create your own requirement.txt with the four lines above)
  4. If you are use school server make sure you change the launch() in the main.py to include share=TRUE to be able to use a public address for accessing the tool's web interface
  5. Upload your PDF and get some cool AI feedback!

#3
#2
#1

@WangzcBruce
Copy link

同学您好,请问上传pdf后一直在processing是为什么呢?
image

image
image

@hiyin
Copy link
Author

hiyin commented Oct 7, 2023

你看下你的PDF parser的后台,感觉像是PDF的处理那边有些问题,我这边是Okay的,会给出feedback!

@hiyin
Copy link
Author

hiyin commented Oct 7, 2023

sciencebeam_parser.service.server

@hiyin
Copy link
Author

hiyin commented Oct 7, 2023

还有可能是你的GPT API的连接问题,都有可能

@hiyin
Copy link
Author

hiyin commented Oct 7, 2023

https://9dc2633eeb8fefc5c0.gradio.live @WangzcBruce 你可以试试我的暂时的,72小时就失效了。

@WangzcBruce
Copy link

好的,谢谢您。这里是我执行
sciencebeam_parser.service.server
的显示
image

@WangzcBruce
Copy link

https://9dc2633eeb8fefc5c0.gradio.live @WangzcBruce 你可以试试我的暂时的,72小时就失效了。
谢谢您!不过访问不了了,
可能key次数过多了image
Failed to generate review... Error: The OpenAI account associated with this API key has been deactivated. If you are the developer for this OpenAI app, please check your email for more information. If you are seeing this error while using another app or site, please reach out to them for more help.

@hiyin
Copy link
Author

hiyin commented Oct 7, 2023

你试试如果加入share=TRUE进入lauch(),用public接口会好些吗

@hiyin
Copy link
Author

hiyin commented Oct 7, 2023

sciencebeam_parser.service.server 好像跟我的运行差不多的,是返回response的时候的问题

@WangzcBruce
Copy link

你试试如果加入share=TRUE进入lauch(),用public接口会好些吗

发现key一直都没有被调用
image
用来public接口也是一直转圈
image

@Zoew420
Copy link

Zoew420 commented Oct 7, 2023

想问一下正常会出现上传文件一直在uploading状态吗,20MB的pdf过了10分钟还在uploading,请问文件大小有限制吗?
image

@WangzcBruce
Copy link

我找到问题所在了,代码所在的服务器需要能够翻墙。感谢作者的帮助

@WangzcBruce
Copy link

想问一下正常会出现上传文件一直在uploading状态吗,20MB的pdf过了10分钟还在uploading,请问文件大小有限制吗? image

pdf压缩一下

@WangzcBruce
Copy link

你试试如果加入share=TRUE进入lauch(),用public接口会好些吗

Thanks the author's help! https://385a2867849723de72.gradio.live/ It works now!!!!

@Zhong-Zhang
Copy link

Zhong-Zhang commented Oct 8, 2023

For reference:

  1. Installation on Mac (Intel Chip), failed.
  2. Installation on Ubuntu 22.04, succeed.
  3. Parser server port 8080, failed.
  4. Chang the port to 7080, succeed.
  5. Free trial OpenAI API key, failed. (It might be expired)
  6. Bought API key, succeed. GPT-3.5-xxx works, GPT-4 is not necessary.
  7. Adding share=True: demo.launch(server_name="0.0.0.0", server_port=7799, share=True)
  8. If using proxy export https_proxy=socks5://xxx.xxx.xxx.xxx:xxx, set export no_proxy="localhost, 127.0.0.1, ::1"
  9. socks proxy seems problematic, use http_proxy & https_proxy instead.

@Ryan0v0
Copy link

Ryan0v0 commented Oct 23, 2023

Hi, I encountered this error with all the documents I uploaded. I was wondering if there's any solution for this? Thanks!

image

@sdu-huanhq
Copy link

你好,请问在llm中输入python main.py后报如下的错误:
2023-11-02 17-16-18 的屏幕截图

@sdu-huanhq
Copy link

你好,请问在llm中输入python main.py后报如下的错误: 2023-11-02 17-16-18 的屏幕截图

请问这种情况是什么原因导致的呢

@wjcper2008
Copy link

I found this tool extremely helpful and fun to use! Thanks to the developers you are awesome! However I believe the repository needs some care afterwards to make the documentation more user-approachable and that users can run the tool smoothly. I am speaking from my own user experience.

Here is the tips how I setup mine and successfully running:

  1. Git clone the repo in a Linux machine! (No Mac) I used CenOS 7 in our school
  2. Make sure you use the GPT-4 API Key, it starts with sk-xxxxxxx... (for mainland users maybe try purchase it from some online e-commerce shop), because I used the GPT-3.5-turbo API key and the quote just exceeded with no reason whenever I run. Also don't forget to change GPT-3.5-turbo to GPT-4
    so your lines in main.py should be:
    def __init__(self, model_name="gpt-4"):
    wrapper = GPT4Wrapper(model_name="gpt-4")
  3. There is no <requirement.txt> but you only need 4 packages stated below to make the main.py work i.e.
    gradio
    pikepdf
    openai
    tiktoken
    (you can also create your own requirement.txt with the four lines above)
  4. If you are use school server make sure you change the launch() in the main.py to include share=TRUE to be able to use a public address for accessing the tool's web interface
  5. Upload your PDF and get some cool AI feedback!

#3 #2 #1

You can use the "gpt-3.5-turbo-16k" instead. GPT4 is too expensive.

@harrywang
Copy link

Thanks. I made it work with gpt 4 turbo on Ubuntu:

https://github.com/harrywang/LLM-scientific-feedback

My Installation Note

I have made the following changes to the code base:

  • change to gpt-4-1106-preview API
  • openai==0.28to avoid this: gpt-4-1106-preview don't work #25
  • added demo.launch(server_name="0.0.0.0", server_port=7799, share='True') to main.py to get a public URL
  • change demo.queue(concurrency_count=3) to demo.queue() to remove a deprecation error
  • create a key.txt and put your API key as the only line in the file, such as sk-xxx

System Used: Ubuntu 20.04.6 LTS

conda env create -f conda_environment.yml
conda activate ScienceBeam
python -m sciencebeam_parser.service.server --port=8080  # Make sure this is running in the background

Then,

conda create -n llm python=3.10
conda activate llm
pip install -r requirements.txt
python main.py

Go to something like https://5a1xxxx.gradio.live/ and upload a PDF paper:

Screenshot 2023-11-24 at 5 22 04 PM

@hsb1995
Copy link

hsb1995 commented Mar 24, 2024

image
@hiyin
您好这个代码就这么多吗?看您复现成功了。我怎么觉得少了很多代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants