Spaces:
Sleeping
Sleeping
Commit
·
6add81b
1
Parent(s):
635f9ff
Add more score models
Browse files
app.py
CHANGED
|
@@ -65,7 +65,7 @@ def compute_score(text: str, model: torch.nn.Module, tokenizer: AutoTokenizer) -
|
|
| 65 |
logits = outputs.logits.squeeze(-1).float().cpu().numpy()
|
| 66 |
|
| 67 |
res = {}
|
| 68 |
-
res["score"] = logits.tolist()
|
| 69 |
res["int_score"] = [int(round(max(0, min(score, 5)))) for score in logits]
|
| 70 |
return res
|
| 71 |
|
|
@@ -87,7 +87,12 @@ THEME = gr.themes.Soft(primary_hue="blue", secondary_hue="amber", neutral_hue="s
|
|
| 87 |
|
| 88 |
MODEL_OPTIONS = [
|
| 89 |
"le-llm/manipulative-score-model",
|
| 90 |
-
"le-llm/gec-score-model"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
]
|
| 92 |
|
| 93 |
def _clear_chat():
|
|
|
|
| 65 |
logits = outputs.logits.squeeze(-1).float().cpu().numpy()
|
| 66 |
|
| 67 |
res = {}
|
| 68 |
+
res["score"] = logits.tolist()[0]
|
| 69 |
res["int_score"] = [int(round(max(0, min(score, 5)))) for score in logits]
|
| 70 |
return res
|
| 71 |
|
|
|
|
| 87 |
|
| 88 |
MODEL_OPTIONS = [
|
| 89 |
"le-llm/manipulative-score-model",
|
| 90 |
+
"le-llm/gec-score-model",
|
| 91 |
+
"le-llm/fineweb-mixtral-edu-score",
|
| 92 |
+
"le-llm/fineweb-nemotron-edu-score",
|
| 93 |
+
"le-llm/alignment-score-model",
|
| 94 |
+
"le-llm/fasttext-quality-score",
|
| 95 |
+
|
| 96 |
]
|
| 97 |
|
| 98 |
def _clear_chat():
|