Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -43,10 +43,10 @@ def introduce_typos(text, typo_probability=0.03):
|
|
43 |
# Create a list to hold the characters with typos
|
44 |
typo_text = []
|
45 |
|
46 |
-
if(random.random > typo_probability):
|
47 |
text = text.replace("o", "oo")
|
48 |
|
49 |
-
if(random.random > typo_probability):
|
50 |
text = text.replace("?", "??")
|
51 |
|
52 |
for char in characters:
|
|
|
43 |
# Create a list to hold the characters with typos
|
44 |
typo_text = []
|
45 |
|
46 |
+
if(random.random() > typo_probability):
|
47 |
text = text.replace("o", "oo")
|
48 |
|
49 |
+
if(random.random() > typo_probability):
|
50 |
text = text.replace("?", "??")
|
51 |
|
52 |
for char in characters:
|