Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json
|
2 |
+
import openai
|
3 |
+
|
4 |
+
with open('GPT_SECRET_KEY.json') as f:
|
5 |
+
data = json.load(f)
|
6 |
+
|
7 |
+
openai.api_key = data["API_KEY"]
|
8 |
+
|
9 |
+
from gpt import GPT
|
10 |
+
from gpt import Example
|
11 |
+
|
12 |
+
gpt = GPT(engine="davinci",
|
13 |
+
temperature=0.6,
|
14 |
+
max_tokens=100)
|