Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ pipe.model.config.id2label = {0: 'greeting', 1: 'farewell', 2: 'other'}
|
|
19 |
# Function to classify input text
|
20 |
def classify_text(text):
|
21 |
result = pipe(text)
|
22 |
-
return result[0]
|
23 |
|
24 |
# Create Gradio interface
|
25 |
iface = gr.Interface(
|
|
|
19 |
# Function to classify input text
|
20 |
def classify_text(text):
|
21 |
result = pipe(text)
|
22 |
+
return result[0]['label'] + ": " + result[0]['score']
|
23 |
|
24 |
# Create Gradio interface
|
25 |
iface = gr.Interface(
|