Spaces:
Running
Running
shaocongma
commited on
Commit
•
81a0bcf
1
Parent(s):
5df90ab
update annoncements
Browse files
app.py
CHANGED
@@ -21,6 +21,7 @@ from references_generator import generate_top_k_references
|
|
21 |
openai_key = os.getenv("OPENAI_API_KEY")
|
22 |
access_key_id = os.getenv('AWS_ACCESS_KEY_ID')
|
23 |
secret_access_key = os.getenv('AWS_SECRET_ACCESS_KEY')
|
|
|
24 |
if access_key_id is None or secret_access_key is None:
|
25 |
print("Access keys are not provided. Outputs cannot be saved to AWS Cloud Storage.\n")
|
26 |
IS_CACHE_AVAILABLE = False
|
@@ -40,7 +41,7 @@ else:
|
|
40 |
IS_OPENAI_API_KEY_AVAILABLE = False
|
41 |
|
42 |
DEFAULT_MODEL = "gpt-4" if IS_OPENAI_API_KEY_AVAILABLE else "gpt-3.5-turbo"
|
43 |
-
GPT4_INTERACTIVE = True if
|
44 |
DEFAULT_SECTIONS = ["introduction", "related works", "backgrounds", "methodology", "experiments",
|
45 |
"conclusion", "abstract"] if IS_OPENAI_API_KEY_AVAILABLE \
|
46 |
else ["introduction", "related works"]
|
@@ -70,8 +71,8 @@ ANNOUNCEMENT = """
|
|
70 |
1. 新增‘高级选项-Prompts模式’. 这个模式仅会输出用于生成论文的Prompts而不会生成论文本身. 可以根据自己的需求修改Prompts, 也可以把Prompts复制给其他语言模型.
|
71 |
2. 把默认的ICLR 2022模板改成了Default模板. 不再显示ICLR的页眉页尾.
|
72 |
3. 使用GPT-4模型:
|
73 |
-
- 点击Duplicate this Space, 进入Settings
|
74 |
-
- 或者可以访问[Auto-Draft-Private](https://huggingface.co/spaces/auto-academic/auto-draft-private)
|
75 |
|
76 |
如果有更多想法和建议欢迎加入QQ群里交流, 如果我在Space里更新了Key我会第一时间通知大家. 群号: ***249738228***."""
|
77 |
|
|
|
21 |
openai_key = os.getenv("OPENAI_API_KEY")
|
22 |
access_key_id = os.getenv('AWS_ACCESS_KEY_ID')
|
23 |
secret_access_key = os.getenv('AWS_SECRET_ACCESS_KEY')
|
24 |
+
GPT4_ENBALE = os.getenv("GPT4_ENBALE")
|
25 |
if access_key_id is None or secret_access_key is None:
|
26 |
print("Access keys are not provided. Outputs cannot be saved to AWS Cloud Storage.\n")
|
27 |
IS_CACHE_AVAILABLE = False
|
|
|
41 |
IS_OPENAI_API_KEY_AVAILABLE = False
|
42 |
|
43 |
DEFAULT_MODEL = "gpt-4" if IS_OPENAI_API_KEY_AVAILABLE else "gpt-3.5-turbo"
|
44 |
+
GPT4_INTERACTIVE = True if GPT4_ENBALE else False
|
45 |
DEFAULT_SECTIONS = ["introduction", "related works", "backgrounds", "methodology", "experiments",
|
46 |
"conclusion", "abstract"] if IS_OPENAI_API_KEY_AVAILABLE \
|
47 |
else ["introduction", "related works"]
|
|
|
71 |
1. 新增‘高级选项-Prompts模式’. 这个模式仅会输出用于生成论文的Prompts而不会生成论文本身. 可以根据自己的需求修改Prompts, 也可以把Prompts复制给其他语言模型.
|
72 |
2. 把默认的ICLR 2022模板改成了Default模板. 不再显示ICLR的页眉页尾.
|
73 |
3. 使用GPT-4模型:
|
74 |
+
- 点击Duplicate this Space, 进入Settings-> Repository secrets, 点击New Secret添加OPENAI_API_KEY为自己的OpenAI API Key. 添加GPT4_ENBALE为1.
|
75 |
+
- 或者可以访问[Auto-Draft-Private](https://huggingface.co/spaces/auto-academic/auto-draft-private).
|
76 |
|
77 |
如果有更多想法和建议欢迎加入QQ群里交流, 如果我在Space里更新了Key我会第一时间通知大家. 群号: ***249738228***."""
|
78 |
|