Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import config
|
|
2 |
import openai
|
3 |
|
4 |
openai.api_key = config.api_key
|
|
|
5 |
response = openai.Completion.create(
|
6 |
model="code-davinci-002",
|
7 |
prompt="##### Fix bugs in the below function\n \n### Buggy Python\nimport Random\na = random.randint(1,12)\nb = random.randint(1,12)\nfor i in range(10):\n question = \"What is \"+a+\" x \"+b+\"? \"\n answer = input(question)\n if answer = a*b\n print (Well done!)\n else:\n print(\"No.\")\n \n### Fixed Python",
|
|
|
2 |
import openai
|
3 |
|
4 |
openai.api_key = config.api_key
|
5 |
+
|
6 |
response = openai.Completion.create(
|
7 |
model="code-davinci-002",
|
8 |
prompt="##### Fix bugs in the below function\n \n### Buggy Python\nimport Random\na = random.randint(1,12)\nb = random.randint(1,12)\nfor i in range(10):\n question = \"What is \"+a+\" x \"+b+\"? \"\n answer = input(question)\n if answer = a*b\n print (Well done!)\n else:\n print(\"No.\")\n \n### Fixed Python",
|