Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,13 +49,11 @@ def classify_educational_article(text: str) -> str:
|
|
49 |
outputs = model(**inputs)
|
50 |
logits = outputs.logits.squeeze(-1).float().detach().numpy()
|
51 |
score = logits.item()
|
52 |
-
result = {
|
53 |
-
"text": text,
|
54 |
"score": score,
|
55 |
"int_score": int(round(max(0, min(score, 5)))),
|
56 |
}
|
57 |
-
|
58 |
-
return result
|
59 |
|
60 |
|
61 |
|
|
|
49 |
outputs = model(**inputs)
|
50 |
logits = outputs.logits.squeeze(-1).float().detach().numpy()
|
51 |
score = logits.item()
|
52 |
+
result = {"text": text,
|
|
|
53 |
"score": score,
|
54 |
"int_score": int(round(max(0, min(score, 5)))),
|
55 |
}
|
56 |
+
return result
|
|
|
57 |
|
58 |
|
59 |
|