Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,8 @@ 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 |
-
|
|
|
|
| 23 |
return [separator.replace('"', "").replace("'", "") for separator in separators]
|
| 24 |
except Exception as e:
|
| 25 |
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 |
+
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"""
|