Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,10 @@ def get_senti(text):
|
|
25 |
l = id2label[ranking[i]]
|
26 |
s = scores[ranking[i]]
|
27 |
out.append(f"{i+1}) {l} {np.round(float(s), 4)}")
|
|
|
|
|
28 |
return "\n".join(out)
|
|
|
29 |
|
30 |
|
31 |
|
@@ -34,7 +37,7 @@ import gradio as gr
|
|
34 |
|
35 |
demo = gr.Interface(
|
36 |
fn=get_senti,
|
37 |
-
inputs=gr.Textbox(lines=2, placeholder="Enter Words Here..."),
|
38 |
outputs="text",
|
39 |
)
|
40 |
demo.launch()
|
|
|
25 |
l = id2label[ranking[i]]
|
26 |
s = scores[ranking[i]]
|
27 |
out.append(f"{i+1}) {l} {np.round(float(s), 4)}")
|
28 |
+
|
29 |
+
out.append('\nNOTE: "The higher the values, the higher the sentiment for that class & vice-versa"')
|
30 |
return "\n".join(out)
|
31 |
+
|
32 |
|
33 |
|
34 |
|
|
|
37 |
|
38 |
demo = gr.Interface(
|
39 |
fn=get_senti,
|
40 |
+
inputs=gr.Textbox(lines=2, placeholder="Enter Words Here (Igbo, Yoruba, Hausa Pidgin)..."),
|
41 |
outputs="text",
|
42 |
)
|
43 |
demo.launch()
|