Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,8 @@ text = st.text_area("Enter the text to classify", "")
|
|
| 11 |
if st.button("Classify"):
|
| 12 |
# Perform text classification on the input text results = classifier(text)[0]
|
| 13 |
# Display the classification result
|
| 14 |
-
max_score = float('-inf')
|
|
|
|
| 15 |
for result in results:
|
| 16 |
if result['score'] > max_score:
|
| 17 |
max_score = result['score'] max_label = result['label']
|
|
|
|
| 11 |
if st.button("Classify"):
|
| 12 |
# Perform text classification on the input text results = classifier(text)[0]
|
| 13 |
# Display the classification result
|
| 14 |
+
max_score = float('-inf')
|
| 15 |
+
max_label = ''
|
| 16 |
for result in results:
|
| 17 |
if result['score'] > max_score:
|
| 18 |
max_score = result['score'] max_label = result['label']
|