KAHRAMAN42 commited on
Commit
fd1664c
·
1 Parent(s): c1e4a24

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ def top3_text_classes(message, history):
2
+ return str(classifier(message)[0][:3]).replace('}, {', '\n').replace('[{', '').replace('}]', '')
3
+
4
+ demo_sentiment = gr.ChatInterface(top3_text_classes, title="Text Sentiment Chatbot", description="Enter your text, and the chatbot will classify the sentiment.")
5
+
6
+ demo_sentiment.launch()