m-ric HF staff commited on
Commit
aba583f
β€’
1 Parent(s): 2cf6dda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -19,8 +19,7 @@ def length_tokens(txt):
19
  def extract_separators_from_string(separators_str):
20
  print('Received:', type(separators_str), 'with value', repr(separators_str))
21
  try:
22
- raw_separators_str = r'{}'.format(separators_str)
23
- separators = raw_separators_str[1:-1].split(", ")
24
  return [separator.replace('"', "").replace("'", "") for separator in separators]
25
  except Exception as e:
26
  raise gr.Error(f"""
 
19
  def extract_separators_from_string(separators_str):
20
  print('Received:', type(separators_str), 'with value', repr(separators_str))
21
  try:
22
+ separators = separators_str[1:-1].replace("\\n", "\n").split(", ")
 
23
  return [separator.replace('"', "").replace("'", "") for separator in separators]
24
  except Exception as e:
25
  raise gr.Error(f"""