cptcrk commited on
Commit
3b72030
Β·
verified Β·
1 Parent(s): 3df050c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -9
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(lines=5, placeholder="Hey there! Drop some sentences (one per line) and get instant sentiment vibesβ€”positive, neutral, or negative ..."),
 
 
 
62
  outputs=["text", "plot"],
63
- title="🌍 Meertalige Sentimentanalyse (Met Neutraal Sentiment en Grafiek)",
64
- description="Voer meerdere zinnen in in elke taal. De app vertaalt elke zin naar Engels en voert sentimentanalyse uit. Het resultaat wordt weergegeven met een overzicht en een grafiek.",
 
 
 
 
65
  examples=[
66
- ["Ik hou van programmeren!\nHet is vandaag een moeilijke dag.\nDeze film was okΓ©."],
67
- ["Je suis fatiguΓ© aujourd'hui.\nLe temps est magnifique!\nC'Γ©tait une expΓ©rience moyenne."],
68
- ["Hoy hace mucho frΓ­o.\nEstoy muy feliz con mi nuevo trabajo.\nNo estoy seguro de cΓ³mo me siento hoy."],
69
- ["Das Essen war fantastisch!\nIch habe slecht geslapen.\nDer Film war ganz normal."]
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
+