Spaces:
Paused
Paused
Update testapi.py
Browse files- testapi.py +1 -1
testapi.py
CHANGED
|
@@ -19,7 +19,7 @@ def predict(data: inputdata):
|
|
| 19 |
# Remove special characters and digits (keep only letters and spaces)
|
| 20 |
text = ''.join([char for char in feature if char.isalpha() or char.isspace()])
|
| 21 |
# Remove extra whitespace
|
| 22 |
-
text = ' '.join(
|
| 23 |
prediction = model.predict(text)
|
| 24 |
return{"message":prediction}
|
| 25 |
|
|
|
|
| 19 |
# Remove special characters and digits (keep only letters and spaces)
|
| 20 |
text = ''.join([char for char in feature if char.isalpha() or char.isspace()])
|
| 21 |
# Remove extra whitespace
|
| 22 |
+
text = ' '.join(text.split())
|
| 23 |
prediction = model.predict(text)
|
| 24 |
return{"message":prediction}
|
| 25 |
|