Anni123 commited on
Commit
7b757e9
1 Parent(s): 12a00ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -3,12 +3,13 @@ import openai # For GPT-3 API ...
3
  import re
4
  import threading
5
  import json
 
6
  from collections import Counter
7
  from llm_utils import *
8
  from utils import *
9
  from retrieval_utils import *
10
 
11
- openai.api_key = "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"
12
 
13
  COT_PROMPT = "Let's think step by step."
14
  DIRECT_ANS_PROMPT = "The answer is"
@@ -195,7 +196,7 @@ def self_construction(datatype):
195
  else:
196
  pass ##todo: datatype == 'UNDEFINED'
197
 
198
- ##读取对应的demo
199
  x, z, y =[], [], []
200
  with open(demo_path, encoding="utf-8") as f:
201
  json_data = json.load(f)
 
3
  import re
4
  import threading
5
  import json
6
+ import os
7
  from collections import Counter
8
  from llm_utils import *
9
  from utils import *
10
  from retrieval_utils import *
11
 
12
+ openai.api_key = os.getenv("api_key")
13
 
14
  COT_PROMPT = "Let's think step by step."
15
  DIRECT_ANS_PROMPT = "The answer is"
 
196
  else:
197
  pass ##todo: datatype == 'UNDEFINED'
198
 
199
+ ##read corresponding demo
200
  x, z, y =[], [], []
201
  with open(demo_path, encoding="utf-8") as f:
202
  json_data = json.load(f)