Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import os
|
|
6 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
7 |
|
8 |
def generate_video_script(title, formality_level, emotional_tone, engagement_level):
|
9 |
-
|
10 |
f"[Use this video framework below]\n"
|
11 |
f"First we need to have a strong hook.\n"
|
12 |
f"A short intro that stops people from scrolling and holds their attention\n"
|
@@ -37,10 +37,10 @@ def generate_video_script(title, formality_level, emotional_tone, engagement_lev
|
|
37 |
)
|
38 |
|
39 |
response = openai.ChatCompletion.create(
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
)
|
45 |
|
46 |
script = response.choices[0].text.strip()
|
|
|
6 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
7 |
|
8 |
def generate_video_script(title, formality_level, emotional_tone, engagement_level):
|
9 |
+
prompt = (
|
10 |
f"[Use this video framework below]\n"
|
11 |
f"First we need to have a strong hook.\n"
|
12 |
f"A short intro that stops people from scrolling and holds their attention\n"
|
|
|
37 |
)
|
38 |
|
39 |
response = openai.ChatCompletion.create(
|
40 |
+
engine="gpt-3.5-turbo",
|
41 |
+
prompt=prompt,
|
42 |
+
max_tokens=300,
|
43 |
+
stop="\n"
|
44 |
)
|
45 |
|
46 |
script = response.choices[0].text.strip()
|