Spaces:
Runtime error
Runtime error
Jforeverss
commited on
Commit
·
b7a0798
1
Parent(s):
51e9072
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ class Bert_model(nn.Module):
|
|
40 |
# Load the model
|
41 |
model_path = "model.pt" # Replace with your actual model path
|
42 |
state_dict = torch.load(model_path)
|
43 |
-
device = "
|
44 |
|
45 |
# Instantiate the model architecture
|
46 |
model = Bert_model(hidden_size=768, dropout_rate=0.1) # Adjust the hidden size to match the saved model
|
|
|
40 |
# Load the model
|
41 |
model_path = "model.pt" # Replace with your actual model path
|
42 |
state_dict = torch.load(model_path)
|
43 |
+
device = torch.device("cuda:0") # or "cpu" if GPU is not available
|
44 |
|
45 |
# Instantiate the model architecture
|
46 |
model = Bert_model(hidden_size=768, dropout_rate=0.1) # Adjust the hidden size to match the saved model
|