Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
|
|
4 |
pipe = pipeline("text-classification", model="p1atdev/saikyou-shield-30m")
|
5 |
|
6 |
def classify(text):
|
7 |
-
return
|
8 |
item["label"]: item["score"]
|
9 |
for item in pipe(text, top_k=2)
|
10 |
}
|
|
|
4 |
pipe = pipeline("text-classification", model="p1atdev/saikyou-shield-30m")
|
5 |
|
6 |
def classify(text):
|
7 |
+
return {
|
8 |
item["label"]: item["score"]
|
9 |
for item in pipe(text, top_k=2)
|
10 |
}
|