Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,11 +14,6 @@ warnings.filterwarnings('ignore')
|
|
14 |
|
15 |
openai.api_key = "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"
|
16 |
|
17 |
-
with open('env_vars.json', 'r') as f:
|
18 |
-
env_vars = json.load(f)
|
19 |
-
openai.api_key = env_vars["OPENAI_API_KEY"]
|
20 |
-
|
21 |
-
os.environ["OPENAI_API_KEY"] = openai.api_key
|
22 |
|
23 |
def num_tokens_from_string(string: str, encoding_name: str) -> int:
|
24 |
"""Returns the number of tokens in a text string."""
|
|
|
14 |
|
15 |
openai.api_key = "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"
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
def num_tokens_from_string(string: str, encoding_name: str) -> int:
|
19 |
"""Returns the number of tokens in a text string."""
|