Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,7 +80,7 @@ class TextClassificationApp:
|
|
| 80 |
CONV_FILTERS = [32, 32] # Number of filters for each kernel size (4 and 5)
|
| 81 |
BIDIRECTIONAL_UNITS = 128
|
| 82 |
self.model = BCNN(EMBEDDING_DIM, OUTPUT_DIM, DROPOUT, BIDIRECTIONAL_UNITS, CONV_FILTERS)
|
| 83 |
-
self.model = torch.load(r'toxic.pt',map_location=torch.device('cpu'))
|
| 84 |
self.model.eval() # Set to evaluation mode
|
| 85 |
|
| 86 |
# Store class names
|
|
|
|
| 80 |
CONV_FILTERS = [32, 32] # Number of filters for each kernel size (4 and 5)
|
| 81 |
BIDIRECTIONAL_UNITS = 128
|
| 82 |
self.model = BCNN(EMBEDDING_DIM, OUTPUT_DIM, DROPOUT, BIDIRECTIONAL_UNITS, CONV_FILTERS)
|
| 83 |
+
self.model = torch.load(r'toxic.pt',map_location=torch.device('cpu'),weights_only = False)
|
| 84 |
self.model.eval() # Set to evaluation mode
|
| 85 |
|
| 86 |
# Store class names
|