Spaces:
Running
Running
Update utils.py
Browse files
utils.py
CHANGED
@@ -78,9 +78,7 @@ def generate_script(system_prompt: str, input_text: str, tone: str, target_lengt
|
|
78 |
)
|
79 |
|
80 |
content = response.choices[0].message.content
|
81 |
-
content = re.sub(r'
|
82 |
-
json\s*|\s*
|
83 |
-
', '', content)
|
84 |
|
85 |
try:
|
86 |
json_data = json.loads(content)
|
|
|
78 |
)
|
79 |
|
80 |
content = response.choices[0].message.content
|
81 |
+
content = re.sub(r'json\s*|\s*', '', content)
|
|
|
|
|
82 |
|
83 |
try:
|
84 |
json_data = json.loads(content)
|