Spaces:
Runtime error
Runtime error
File size: 1,070 Bytes
53f1934 9073835 6bb7168 9073835 53f0238 53f1934 e551ca5 53f1934 9073835 771e9d0 0ef2ca5 2522810 53f1934 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
from HebEMO import HebEMO
from transformers import pipeline
import streamlit as st
import matplotlib.pyplot as plt
HebEMO_model = HebEMO()
x = st.slider("Select a value")
st.write(x, "squared is", x * x)
#@st.cache
st.title("Find sentiment")
st.write("HebEMO is a tool to detect polarity and extract emotions from Hebrew user-generated content (UGC), which was trained on a unique Covid-19 related dataset that we collected and annotated. HebEMO yielded a high performance of weighted average F1-score = 0.96 for polarity classification. Emotion detection reached an F1-score of 0.78-0.97, with the exception of *surprise*, which the model failed to capture (F1 = 0.41). These results are better than the best-reported performance, even when compared to the English language.")
sent = st.text_area("Text", "write here", height = 20)
# interact(HebEMO_model.hebemo, text='ืืืืื ืืคืื ืืืืืฉืจื', plot=fixed(True), input_path=fixed(False), save_results=fixed(False),)
res, fig = HebEMO_model.hebemo(sent, plot=True)
st.write (res)
st.pyplot(fig=fig)
|