Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import torch.nn.functional as F
|
|
9 |
import pandas as pd
|
10 |
import re
|
11 |
from sacremoses import MosesTokenizer, MosesDetokenizer
|
12 |
-
teencode_df = pd.read_csv('
|
13 |
teencode_list = teencode_df['teencode'].to_list()
|
14 |
map_list = teencode_df['map'].to_list()
|
15 |
class BCNN(nn.Module):
|
@@ -231,7 +231,7 @@ class TextClassificationApp:
|
|
231 |
|
232 |
def main():
|
233 |
# Replace these with your actual model path and class names
|
234 |
-
MODEL_PATH = '
|
235 |
CLASS_NAMES = [
|
236 |
'Non-toxic',
|
237 |
'Toxic'
|
|
|
9 |
import pandas as pd
|
10 |
import re
|
11 |
from sacremoses import MosesTokenizer, MosesDetokenizer
|
12 |
+
teencode_df = pd.read_csv('teencode.txt',names=['teencode','map'],sep='\t',)
|
13 |
teencode_list = teencode_df['teencode'].to_list()
|
14 |
map_list = teencode_df['map'].to_list()
|
15 |
class BCNN(nn.Module):
|
|
|
231 |
|
232 |
def main():
|
233 |
# Replace these with your actual model path and class names
|
234 |
+
MODEL_PATH = 'toxic.pt'
|
235 |
CLASS_NAMES = [
|
236 |
'Non-toxic',
|
237 |
'Toxic'
|