Return result of transformer
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ def greet(name):
|
|
| 6 |
|
| 7 |
def sentiment(intext):
|
| 8 |
classifier = pipeline("sentiment-analysis")
|
| 9 |
-
classifier(intext)
|
| 10 |
|
| 11 |
iface = gr.Interface(fn=sentiment, inputs="text", outputs="text")
|
| 12 |
iface.launch()
|
|
|
|
| 6 |
|
| 7 |
def sentiment(intext):
|
| 8 |
classifier = pipeline("sentiment-analysis")
|
| 9 |
+
return classifier(intext)
|
| 10 |
|
| 11 |
iface = gr.Interface(fn=sentiment, inputs="text", outputs="text")
|
| 12 |
iface.launch()
|