File size: 427 Bytes
b832def
 
5152cc0
 
 
 
 
 
 
 
 
 
 
 
 
 
b832def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr

from transforme import pipeline

sentiment = pipeline("emoition-analysis")

def get_emotion( input_text):
    return emotion(input_text)

iface =  gr.Inface(in = get_emotion,
                  input = "text",
                  outputs = ["text"],
                  title = 'emotion analysis',
                  description='get emotion negative/positive for the given input')

iface.lanch(inline = false)