Spaces:
Sleeping
Sleeping
changed submit button label to classify
Browse files
app.py
CHANGED
|
@@ -30,18 +30,19 @@ def predict(query: str) -> dict:
|
|
| 30 |
return label2ids
|
| 31 |
|
| 32 |
demo = gr.Interface(
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
| 40 |
["The gentle touch of your hand on mine is a silent promise that echoes through the corridors of my heart."],
|
| 41 |
["The rain mirrored the tears I couldn't stop, each drop a tiny echo of the ache in my heart. The world seemed muted, colors drained, and a heavy weight settled upon my soul."],
|
| 42 |
["Walking through the dusty attic, I stumbled upon a hidden door. With a mix of trepidation and excitement, I pushed it open, expecting cobwebs and forgotten junk. Instead, a flood of sunlight revealed a secret garden, blooming with vibrant flowers and buzzing with life. My jaw dropped in pure astonishment."],
|
| 43 |
-
|
| 44 |
-
]
|
| 45 |
)
|
| 46 |
|
| 47 |
demo.launch(share=True)
|
|
|
|
| 30 |
return label2ids
|
| 31 |
|
| 32 |
demo = gr.Interface(
|
| 33 |
+
theme = gr.themes.Soft(),
|
| 34 |
+
title = "RHM Emotion Classifier π",
|
| 35 |
+
description = "<b> NOTE: </b> Can be a bit slower here π’ <h3>On GPU it is much faster π</h3>",
|
| 36 |
+
fn = predict,
|
| 37 |
+
inputs = gr.components.Textbox(label='Write your text here', lines=3),
|
| 38 |
+
outputs = gr.components.Label(label='Predictions', num_top_classes=6),
|
| 39 |
+
submit_btn = gr.Button("Classify", variant="primary"),
|
| 40 |
+
allow_flagging = 'never',
|
| 41 |
+
examples = [
|
| 42 |
["The gentle touch of your hand on mine is a silent promise that echoes through the corridors of my heart."],
|
| 43 |
["The rain mirrored the tears I couldn't stop, each drop a tiny echo of the ache in my heart. The world seemed muted, colors drained, and a heavy weight settled upon my soul."],
|
| 44 |
["Walking through the dusty attic, I stumbled upon a hidden door. With a mix of trepidation and excitement, I pushed it open, expecting cobwebs and forgotten junk. Instead, a flood of sunlight revealed a secret garden, blooming with vibrant flowers and buzzing with life. My jaw dropped in pure astonishment."],
|
| 45 |
+
]
|
|
|
|
| 46 |
)
|
| 47 |
|
| 48 |
demo.launch(share=True)
|