Spaces:
Running
Running
Update utils.py
Browse files
utils.py
CHANGED
@@ -48,7 +48,7 @@ def generate_script(system_prompt: str, input_text: str, tone: str, target_lengt
|
|
48 |
input_text = truncate_text(input_text)
|
49 |
word_limit = 300 if target_length == "Short (1-2 min)" else 750
|
50 |
|
51 |
-
|
52 |
{system_prompt}
|
53 |
TONE: {tone}
|
54 |
TARGET LENGTH: {target_length} (approximately {word_limit} words)
|
@@ -67,6 +67,9 @@ def generate_script(system_prompt: str, input_text: str, tone: str, target_lengt
|
|
67 |
"""
|
68 |
|
69 |
|
|
|
|
|
|
|
70 |
response = groq_client.chat.completions.create(
|
71 |
messages=[
|
72 |
{"role": "system", "content": prompt},
|
|
|
48 |
input_text = truncate_text(input_text)
|
49 |
word_limit = 300 if target_length == "Short (1-2 min)" else 750
|
50 |
|
51 |
+
prompt = f"""
|
52 |
{system_prompt}
|
53 |
TONE: {tone}
|
54 |
TARGET LENGTH: {target_length} (approximately {word_limit} words)
|
|
|
67 |
"""
|
68 |
|
69 |
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
response = groq_client.chat.completions.create(
|
74 |
messages=[
|
75 |
{"role": "system", "content": prompt},
|