Spaces:
Sleeping
Sleeping
Commit ·
326c338
1
Parent(s): 10e5f20
Update functions.py
Browse files- functions.py +0 -4
functions.py
CHANGED
|
@@ -35,10 +35,6 @@ def preprocess_text(text):
|
|
| 35 |
lemmatized_clean = [word.translate(str.maketrans('', '', string.punctuation)) for word in lemmatized_words]
|
| 36 |
return ' '.join(lemmatized_clean)
|
| 37 |
|
| 38 |
-
def text_model(df):
|
| 39 |
-
df['preprocessed_text'] = df['Comment'].apply(preprocess_text)
|
| 40 |
-
return df['preprocessed_text']
|
| 41 |
-
|
| 42 |
def prediction(model, X):
|
| 43 |
model = load_model('best_model.keras')
|
| 44 |
y_pred = model.predict(X)
|
|
|
|
| 35 |
lemmatized_clean = [word.translate(str.maketrans('', '', string.punctuation)) for word in lemmatized_words]
|
| 36 |
return ' '.join(lemmatized_clean)
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
def prediction(model, X):
|
| 39 |
model = load_model('best_model.keras')
|
| 40 |
y_pred = model.predict(X)
|