Spaces:
Runtime error
Runtime error
File size: 643 Bytes
90afd57 c155b67 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import streamlit as st
from .sa import predictor
def write():
st.markdown(
"""
# Arabic Sarcasm Detection
This is a simple sarcasm detection app that uses the [MARBERT](https://huggingface.co/UBC-NLP/MARBERT) model trained on [ArSarcasm](https://github.com/iabufarha/ArSarcasm)
"""
)
input_text = st.text_input(
"Enter your text here:",
)
if st.button("Predict"):
with st.spinner("Predicting..."):
prediction, scores = predictor.get_preds_from_sarcasm([input_text])
st.write(f"Result: {prediction[0]}")
st.write(f"Score: {scores[0]}")
|