Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
|
| 3 |
+
# Load the classification pipeline with the specified model
|
| 4 |
+
pipe = pipeline("text-classification", model="tabularisai/multilingual-sentiment-analysis")
|
| 5 |
+
|
| 6 |
+
# Classify a new sentence
|
| 7 |
+
sentence = "I love this product! It's amazing and works perfectly."
|
| 8 |
+
result = pipe(sentence)
|
| 9 |
+
|
| 10 |
+
# Print the result
|
| 11 |
+
print(result)
|