Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,9 +10,9 @@ def write_essay(sample_topic, user_topic):
|
|
10 |
try:
|
11 |
response = openai.Completion.create(
|
12 |
model="text-davinci-002",
|
13 |
-
prompt= "Instruction: Write a five-paragraph essay for the following topic:\nSuggested Length: more than
|
14 |
temperature=0.7,
|
15 |
-
max_tokens=
|
16 |
top_p=1.0,
|
17 |
frequency_penalty=0.0,
|
18 |
presence_penalty=0.0
|
|
|
10 |
try:
|
11 |
response = openai.Completion.create(
|
12 |
model="text-davinci-002",
|
13 |
+
prompt= "Instruction: Write a five-paragraph essay for the following topic:\nSuggested Length: more than 400 words\nTOPIC: " + sample_topic + "\n\nESSAY:",
|
14 |
temperature=0.7,
|
15 |
+
max_tokens=1500,
|
16 |
top_p=1.0,
|
17 |
frequency_penalty=0.0,
|
18 |
presence_penalty=0.0
|