Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,14 +5,14 @@ import pandas as pd
|
|
| 5 |
from tensorflow.keras.layers import TextVectorization
|
| 6 |
|
| 7 |
# Load your data
|
| 8 |
-
new_data = pd.read_csv('
|
| 9 |
|
| 10 |
x = new_data['comment_text']
|
| 11 |
y = new_data[new_data.columns[2:]].values
|
| 12 |
|
| 13 |
-
max_features =
|
| 14 |
vectorizer = TextVectorization(max_tokens=max_features,
|
| 15 |
-
output_sequence_length=
|
| 16 |
output_mode='int')
|
| 17 |
vectorizer.get_vocabulary()
|
| 18 |
vectorizer.adapt(x.values)
|
|
|
|
| 5 |
from tensorflow.keras.layers import TextVectorization
|
| 6 |
|
| 7 |
# Load your data
|
| 8 |
+
new_data = pd.read_csv('train.csv') # Make sure to adjust the path if necessary
|
| 9 |
|
| 10 |
x = new_data['comment_text']
|
| 11 |
y = new_data[new_data.columns[2:]].values
|
| 12 |
|
| 13 |
+
max_features = 160000
|
| 14 |
vectorizer = TextVectorization(max_tokens=max_features,
|
| 15 |
+
output_sequence_length=1800,
|
| 16 |
output_mode='int')
|
| 17 |
vectorizer.get_vocabulary()
|
| 18 |
vectorizer.adapt(x.values)
|