Spaces:
Sleeping
Sleeping
Commit
·
fd1664c
1
Parent(s):
c1e4a24
Create app.py
Browse files
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()
|