File size: 859 Bytes
732c81b
c4cee66
eb09a70
71a4d6b
84a46fd
414ee25
 
d0c6cde
84a46fd
 
5f01461
84a46fd
 
 
 
 
3695726
84a46fd
5f01461
71a4d6b
75871a8
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 transformers import pipeline

# Turkish 
#sentiment_pipeline_tr = pipeline(task = "text-classification", model = "SoDehghan/BERTurk-hate-speech")  # "gritli/bert-sentiment-analyses-imdb"
#header_tr = r"$\textsf{\scriptsize HSD in Turkish}$"
#st.subheader(header_tr)

#tr_input = st.text_area("Enter your text here:", height=50, key="tr_input")  #height=30
#if st.button("Click for predictions!", key="tr_predict"):
    #st.write(" ")
    #with st.spinner('Generating predictions...'):
        #result_tr = sentiment_pipeline_tr(tr_input)
        #sentiment_tr = result_tr[0]["label"]
        #label_dict = {'LABEL_1': 'Hate ❌  ', 'LABEL_0': 'Non-hate βœ…  '}  #🚫
        #sentiment_tr = label_dict[sentiment_tr]

        #strength_tr = " "
        #st.write(f"Detection: {sentiment_tr},  Strength: {strength_tr}")