Spaces:
Sleeping
Sleeping
Update models/hsd_tr.py
Browse files- models/hsd_tr.py +12 -5
models/hsd_tr.py
CHANGED
@@ -1,10 +1,17 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
# Turkish
|
5 |
-
|
6 |
-
#header_tr = r"$\textsf{\scriptsize HSD in Turkish}$"
|
7 |
-
#st.subheader(header_tr)
|
8 |
|
9 |
#tr_input = st.text_area("Enter your text here:", height=50, key="tr_input") #height=30
|
10 |
#if st.button("Click for predictions!", key="tr_predict"):
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
def write():
|
5 |
+
st.markdown(
|
6 |
+
"""
|
7 |
+
# Hate Speech Detection in Turkish
|
8 |
+
|
9 |
+
"""
|
10 |
+
)
|
11 |
+
|
12 |
|
13 |
# Turkish
|
14 |
+
sentiment_pipeline_tr = pipeline(task = "text-classification", model = "SoDehghan/BERTurk-hate-speech") # "gritli/bert-sentiment-analyses-imdb"
|
|
|
|
|
15 |
|
16 |
#tr_input = st.text_area("Enter your text here:", height=50, key="tr_input") #height=30
|
17 |
#if st.button("Click for predictions!", key="tr_predict"):
|