Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ import gc
|
|
61 |
import os
|
62 |
|
63 |
config = {
|
64 |
-
'model': '
|
65 |
'dropout': 0.2,
|
66 |
'max_length': 512,
|
67 |
'batch_size':3,
|
@@ -76,7 +76,7 @@ Comparing two essays. <br>
|
|
76 |
One predicted written by students, one predicted written by LLM
|
77 |
"""
|
78 |
|
79 |
-
train_essays = pd.read_csv("
|
80 |
|
81 |
|
82 |
import transformers
|
@@ -133,7 +133,7 @@ class MeanPooling(nn.Module):
|
|
133 |
return mean_embedding
|
134 |
|
135 |
model = mymodel(config).to(device=config['device'])
|
136 |
-
model.load_state_dict(torch.load('
|
137 |
model.eval()
|
138 |
|
139 |
#preds = []
|
|
|
61 |
import os
|
62 |
|
63 |
config = {
|
64 |
+
'model': 'microsoft/deberta-v3-base',
|
65 |
'dropout': 0.2,
|
66 |
'max_length': 512,
|
67 |
'batch_size':3,
|
|
|
76 |
One predicted written by students, one predicted written by LLM
|
77 |
"""
|
78 |
|
79 |
+
train_essays = pd.read_csv("train_essays.csv")
|
80 |
|
81 |
|
82 |
import transformers
|
|
|
133 |
return mean_embedding
|
134 |
|
135 |
model = mymodel(config).to(device=config['device'])
|
136 |
+
model.load_state_dict(torch.load('my_model.pth'))
|
137 |
model.eval()
|
138 |
|
139 |
#preds = []
|