Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,7 @@ rating_pipe = pipeline("text-classification", model="Leo0129/CustomModel_dianpin
|
|
54 |
def rate_quality(text):
|
55 |
result = rating_pipe(text)[0]
|
56 |
label = result["label"].split("(")[0].strip().lower()
|
57 |
-
label_map = {"
|
58 |
return label_map.get(label, "Unknown")
|
59 |
|
60 |
# Streamlit UI
|
|
|
54 |
def rate_quality(text):
|
55 |
result = rating_pipe(text)[0]
|
56 |
label = result["label"].split("(")[0].strip().lower()
|
57 |
+
label_map = {"LABEL_0": "Poor", "LABEL_1": "Neutral", "LABEL_2": "Good"}
|
58 |
return label_map.get(label, "Unknown")
|
59 |
|
60 |
# Streamlit UI
|