Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,13 @@
|
|
1 |
|
2 |
import openai
|
3 |
import gradio as gr
|
|
|
4 |
|
5 |
|
6 |
|
7 |
#OpenAi call
|
8 |
def gpt3(texts):
|
9 |
-
openai.api_key = "
|
10 |
response = openai.Completion.create(
|
11 |
engine="code-davinci-002",
|
12 |
prompt= texts,
|
|
|
1 |
|
2 |
import openai
|
3 |
import gradio as gr
|
4 |
+
import os
|
5 |
|
6 |
|
7 |
|
8 |
#OpenAi call
|
9 |
def gpt3(texts):
|
10 |
+
openai.api_key = os.environ["Secret"]
|
11 |
response = openai.Completion.create(
|
12 |
engine="code-davinci-002",
|
13 |
prompt= texts,
|