For anyone encounter installation, server and request. issues, please look here
hiyin opened this issue · 21 comments
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:
- Git clone the repo in a Linux machine! (No Mac) I used CenOS 7 in our school
- 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")
- 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) - 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
- Upload your PDF and get some cool AI feedback!
你看下你的PDF parser的后台,感觉像是PDF的处理那边有些问题,我这边是Okay的,会给出feedback!
sciencebeam_parser.service.server
还有可能是你的GPT API的连接问题,都有可能
https://9dc2633eeb8fefc5c0.gradio.live @WangzcBruce 你可以试试我的暂时的,72小时就失效了。
https://9dc2633eeb8fefc5c0.gradio.live @WangzcBruce 你可以试试我的暂时的,72小时就失效了。
谢谢您!不过访问不了了,
可能key次数过多了
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.
你试试如果加入share=TRUE进入lauch(),用public接口会好些吗
sciencebeam_parser.service.server 好像跟我的运行差不多的,是返回response的时候的问题
我找到问题所在了,代码所在的服务器需要能够翻墙。感谢作者的帮助
你试试如果加入share=TRUE进入lauch(),用public接口会好些吗
Thanks the author's help! https://385a2867849723de72.gradio.live/ It works now!!!!
For reference:
- Installation on Mac (Intel Chip), failed.
- Installation on Ubuntu 22.04, succeed.
- Parser server port 8080, failed.
- Chang the port to 7080, succeed.
- Free trial OpenAI API key, failed. (It might be expired)
- Bought API key, succeed. GPT-3.5-xxx works, GPT-4 is not necessary.
- Adding share=True:
demo.launch(server_name="0.0.0.0", server_port=7799, share=True)
- If using proxy
export https_proxy=socks5://xxx.xxx.xxx.xxx:xxx
, setexport no_proxy="localhost, 127.0.0.1, ::1"
- socks proxy seems problematic, use http_proxy & https_proxy instead.
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:
- Git clone the repo in a Linux machine! (No Mac) I used CenOS 7 in our school
- 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")
- 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)- 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
- Upload your PDF and get some cool AI feedback!
You can use the "gpt-3.5-turbo-16k" instead. GPT4 is too expensive.
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.28
to avoid this: #25- added
demo.launch(server_name="0.0.0.0", server_port=7799, share='True')
tomain.py
to get a public URL - change
demo.queue(concurrency_count=3)
todemo.queue()
to remove a deprecation error - create a
key.txt
and put your API key as the only line in the file, such assk-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: