Update app.py
Browse files
app.py
CHANGED
@@ -6,10 +6,11 @@ import io
|
|
6 |
from torch.utils.data import Dataset
|
7 |
from sklearn.metrics import classification_report
|
8 |
|
9 |
-
# Load
|
10 |
-
|
11 |
-
|
12 |
-
model = LlamaForSequenceClassification.from_pretrained(
|
|
|
13 |
model.eval()
|
14 |
|
15 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
6 |
from torch.utils.data import Dataset
|
7 |
from sklearn.metrics import classification_report
|
8 |
|
9 |
+
# Load Model and Tokenizer
|
10 |
+
tokenizer = GPT2Tokenizer.from_pretrained("jatinmehra/smolLM-fined-tuned-for-PLAGAIRISM_Detection")
|
11 |
+
|
12 |
+
model = LlamaForSequenceClassification.from_pretrained("jatinmehra/smolLM-fined-tuned-for-PLAGAIRISM_Detection", num_labels=2)
|
13 |
+
|
14 |
model.eval()
|
15 |
|
16 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|