Narayana02 commited on
Commit
9dfb14d
·
verified ·
1 Parent(s): 3d01087

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +1 -3
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)