Spaces:
Build error
Build error
File size: 404 Bytes
b11881c 6742665 b11881c 6742665 4260e5f 6742665 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import gradio as gr
from xlm_emo.classifier import EmotionClassifier
def emotionClassifier(text):
ec = EmotionClassifier()
translation = ec.predict([text])
res=translation[0]
return res
inputs = gr.inputs.Textbox(lines = 2, label="Text")
outpts=gr.outputs.Label(label="Output")
gr.Interface(emotionClassifier, inputs=inputs,outputs=outpts, title='Emotions Analyser',theme='peach').launch() |