Files changed (3) hide show
  1. README.md +12 -0
  2. config.py +1 -1
  3. main.py +3 -2
README.md CHANGED
@@ -1,3 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  # ChatGPT 学术优化
2
 
3
  **如果喜欢这个项目,请给它一个Star;如果你发明了更好用的快捷键或函数插件,欢迎发issue或者pull requests**
 
1
+ ---
2
+ title: academic-chatgpt
3
+ emoji: 😻
4
+ colorFrom: blue
5
+ colorTo: blue
6
+ sdk: gradio
7
+ sdk_version: 3.25.0
8
+ python_version: 3.11
9
+ app_file: main.py
10
+ pinned: false
11
+ ---
12
+
13
  # ChatGPT 学术优化
14
 
15
  **如果喜欢这个项目,请给它一个Star;如果你发明了更好用的快捷键或函数插件,欢迎发issue或者pull requests**
config.py CHANGED
@@ -1,5 +1,5 @@
1
  # [step 1]>> 例如: API_KEY = "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" (此key无效)
2
- API_KEY = "sk-此处填API密钥"
3
 
4
  # [step 2]>> 改为True应用代理,如果直接在海外服务器部署,此处不修改
5
  USE_PROXY = False
 
1
  # [step 1]>> 例如: API_KEY = "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" (此key无效)
2
+ API_KEY = "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"
3
 
4
  # [step 2]>> 改为True应用代理,如果直接在海外服务器部署,此处不修改
5
  USE_PROXY = False
main.py CHANGED
@@ -52,6 +52,7 @@ if LAYOUT == "TOP-DOWN":
52
  cancel_handles = []
53
  with gr.Blocks(title="ChatGPT 学术优化", theme=set_theme, analytics_enabled=False, css=advanced_css) as demo:
54
  gr.HTML(title_html)
 
55
  cookies = gr.State({'api_key': API_KEY, 'llm_model': LLM_MODEL})
56
  with gr_L1():
57
  with gr_L2(scale=2):
@@ -61,7 +62,7 @@ with gr.Blocks(title="ChatGPT 学术优化", theme=set_theme, analytics_enabled=
61
  with gr_L2(scale=1):
62
  with gr.Accordion("输入区", open=True) as area_input_primary:
63
  with gr.Row():
64
- txt = gr.Textbox(show_label=False, placeholder="Input question here.").style(container=False)
65
  with gr.Row():
66
  submitBtn = gr.Button("提交", variant="primary")
67
  with gr.Row():
@@ -171,4 +172,4 @@ def auto_opentab_delay():
171
  threading.Thread(target=auto_update, name="self-upgrade", daemon=True).start()
172
 
173
  auto_opentab_delay()
174
- demo.queue(concurrency_count=CONCURRENT_COUNT).launch(server_name="0.0.0.0", server_port=PORT, auth=AUTHENTICATION)
 
52
  cancel_handles = []
53
  with gr.Blocks(title="ChatGPT 学术优化", theme=set_theme, analytics_enabled=False, css=advanced_css) as demo:
54
  gr.HTML(title_html)
55
+ gr.HTML('''<center><a href="https://huggingface.co/spaces/qingxu98/gpt-academic?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>请您打开此页面后务必点击上方的“复制空间”(Duplicate Space)按钮!<font color="#FF00FF">使用时,先在输入框填入API-KEY然后回车。</font><br/>切忌在“复制空间”(Duplicate Space)之前填入API_KEY或进行提问,否则您的API_KEY将极可能被空间所有者攫取!</center>''')
56
  cookies = gr.State({'api_key': API_KEY, 'llm_model': LLM_MODEL})
57
  with gr_L1():
58
  with gr_L2(scale=2):
 
62
  with gr_L2(scale=1):
63
  with gr.Accordion("输入区", open=True) as area_input_primary:
64
  with gr.Row():
65
+ txt = gr.Textbox(show_label=False, placeholder="Input question/api-key here.").style(container=False)
66
  with gr.Row():
67
  submitBtn = gr.Button("提交", variant="primary")
68
  with gr.Row():
 
172
  threading.Thread(target=auto_update, name="self-upgrade", daemon=True).start()
173
 
174
  auto_opentab_delay()
175
+ demo.queue(concurrency_count=CONCURRENT_COUNT).launch(server_name="0.0.0.0", share=False)