Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -56,21 +56,35 @@ def analyze_multilingual_sentences(text):
|
|
56 |
return output, fig
|
57 |
|
58 |
# Gradio-interface met tekstanalyse en een grafiek
|
|
|
59 |
demo = gr.Interface(
|
60 |
-
fn=analyze_multilingual_sentences,
|
61 |
-
inputs=gr.Textbox(
|
|
|
|
|
|
|
62 |
outputs=["text", "plot"],
|
63 |
-
title="π
|
64 |
-
description="
|
|
|
|
|
|
|
|
|
65 |
examples=[
|
66 |
-
["
|
67 |
-
["
|
68 |
-
["
|
69 |
-
["
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
71 |
)
|
72 |
|
73 |
# Start de app
|
74 |
demo.launch()
|
75 |
|
76 |
|
|
|
|
56 |
return output, fig
|
57 |
|
58 |
# Gradio-interface met tekstanalyse en een grafiek
|
59 |
+
# Aangepaste Gradio-interface met stijling
|
60 |
demo = gr.Interface(
|
61 |
+
fn=analyze_multilingual_sentences,
|
62 |
+
inputs=gr.Textbox(
|
63 |
+
lines=5,
|
64 |
+
placeholder="Hey there! Drop some sentences (one per line) and get instant sentiment vibesβpositive, neutral, or negative...",
|
65 |
+
),
|
66 |
outputs=["text", "plot"],
|
67 |
+
title="π Multilingual Sentiment Analysis with Graph Feedback",
|
68 |
+
description="""
|
69 |
+
<div style='font-size: 18px; font-weight: bold; text-align: center; color: #333;'>
|
70 |
+
Enter sentences in any languageβthis AI-powered app translates, analyzes the vibe, and shows the results in a cool summary & chart.
|
71 |
+
</div>
|
72 |
+
""",
|
73 |
examples=[
|
74 |
+
["I just aced my exam. My cat knocked over my coffee. Pineapple on pizza is the best debate of our generation."],
|
75 |
+
["Woke up feeling like the main character. Spilled my cereal and questioned my life choices. This app better not judge me."],
|
76 |
+
["Mondays should be illegal. I found a sock thatβs been missing for six months. The WiFi went out, total meltdown mode."],
|
77 |
+
["Bought a plant, named it Kevin. Kevin is already dying. Send help and sunlight."],
|
78 |
+
["Coffee is my entire personality now. Just danced in the rain and felt like I was in a movie. AI, tell me if Iβm emotionally stable."],
|
79 |
+
["I accidentally sent βlove youβ to my boss. Had ice cream for breakfast because why not. My dog just ignored me, rude."],
|
80 |
+
["I love coding. Syntax error. WHY IS THIS HAPPENING TO ME."],
|
81 |
+
],
|
82 |
+
theme="default",
|
83 |
+
allow_flagging="never"
|
84 |
)
|
85 |
|
86 |
# Start de app
|
87 |
demo.launch()
|
88 |
|
89 |
|
90 |
+
|