Spaces:
Runtime error
Runtime error
Rachel Rakov
commited on
Commit
·
04433f3
1
Parent(s):
8597b7a
Troubleshooting openAI key
Browse files- eng_to_aslGloss_app.py +2 -2
eng_to_aslGloss_app.py
CHANGED
@@ -7,7 +7,7 @@ import tiktoken
|
|
7 |
|
8 |
# Set openAI key
|
9 |
HF_TOKEN = os.getenv("NextStar")
|
10 |
-
|
11 |
|
12 |
#Set prompt engineering paths (so globally available)
|
13 |
inStructionPath = "intro_instructions_combine.txt"
|
@@ -79,7 +79,7 @@ def getGlossFromText(query):
|
|
79 |
|
80 |
def getASLGloss(testQs):
|
81 |
"""Get ASL gloss from OpenAI using our prompt engineering"""
|
82 |
-
|
83 |
completion = openai.ChatCompletion.create(
|
84 |
model = 'gpt-4',
|
85 |
messages = [
|
|
|
7 |
|
8 |
# Set openAI key
|
9 |
HF_TOKEN = os.getenv("NextStar")
|
10 |
+
|
11 |
|
12 |
#Set prompt engineering paths (so globally available)
|
13 |
inStructionPath = "intro_instructions_combine.txt"
|
|
|
79 |
|
80 |
def getASLGloss(testQs):
|
81 |
"""Get ASL gloss from OpenAI using our prompt engineering"""
|
82 |
+
openai.api_key = HF_TOKEN
|
83 |
completion = openai.ChatCompletion.create(
|
84 |
model = 'gpt-4',
|
85 |
messages = [
|