Spaces:
Runtime error
Runtime error
Weijia Shi
commited on
Commit
·
825a5e8
1
Parent(s):
72fc934
asd
Browse files
app.py
CHANGED
@@ -19,9 +19,9 @@ def calculatePerplexity_gpt3(prompt):
|
|
19 |
temperature=1.0,
|
20 |
logprobs=5,
|
21 |
echo=True)
|
22 |
-
except openai.
|
23 |
-
print(openai.
|
24 |
-
openai.
|
25 |
|
26 |
data = responses["choices"][0]["logprobs"]
|
27 |
all_prob = [d for d in data["token_logprobs"] if d is not None]
|
|
|
19 |
temperature=1.0,
|
20 |
logprobs=5,
|
21 |
echo=True)
|
22 |
+
except openai.APIError:
|
23 |
+
print(openai.APIError)
|
24 |
+
openai.APIError, [], 0
|
25 |
|
26 |
data = responses["choices"][0]["logprobs"]
|
27 |
all_prob = [d for d in data["token_logprobs"] if d is not None]
|