Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ speaker_embeddings = {
|
|
19 |
|
20 |
|
21 |
def predict(text, speaker):
|
22 |
-
|
23 |
text="Du måste ha minst ett och max 200 tecken."
|
24 |
ar=[int(s) for s in re.findall(r'\b\d+\b',text)]
|
25 |
for arr in ar:
|
|
|
19 |
|
20 |
|
21 |
def predict(text, speaker):
|
22 |
+
if len(text.strip()) == 0 or len(text.strip())>200:
|
23 |
text="Du måste ha minst ett och max 200 tecken."
|
24 |
ar=[int(s) for s in re.findall(r'\b\d+\b',text)]
|
25 |
for arr in ar:
|