Spaces:
Runtime error
Runtime error
Commit
·
3eec426
1
Parent(s):
f0f7082
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
| 1 |
import openai
|
|
|
|
| 2 |
|
| 3 |
# Set up the OpenAI API credentials
|
| 4 |
-
openai.api_key =
|
| 5 |
|
| 6 |
# Define a function that takes a user's input code as a prompt and uses the OpenAI API to generate a corrected version of the code
|
| 7 |
def correct_code(prompt):
|
|
|
|
| 1 |
import openai
|
| 2 |
+
import secrets
|
| 3 |
|
| 4 |
# Set up the OpenAI API credentials
|
| 5 |
+
openai.api_key = secrets.OPENAI_API_KEY
|
| 6 |
|
| 7 |
# Define a function that takes a user's input code as a prompt and uses the OpenAI API to generate a corrected version of the code
|
| 8 |
def correct_code(prompt):
|