Spaces:
Build error
Build error
update the preprocessing step
Browse files
app.py
CHANGED
|
@@ -102,7 +102,11 @@ async def predict(predictionFeatures: PredictionFeatures):
|
|
| 102 |
"""
|
| 103 |
|
| 104 |
# First preprocess the text directly
|
| 105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
# Use the preprocessed text for prediction
|
| 108 |
list_text = [preprocessed_result['text_clean']['0']]
|
|
|
|
| 102 |
"""
|
| 103 |
|
| 104 |
# First preprocess the text directly
|
| 105 |
+
text_to_preprocess = {
|
| 106 |
+
"tweet": predictionFeatures.Text
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
preprocessed_result = await preprocess_text(text_to_preprocess)
|
| 110 |
|
| 111 |
# Use the preprocessed text for prediction
|
| 112 |
list_text = [preprocessed_result['text_clean']['0']]
|