SoDehghan commited on
Commit
a0c5046
·
verified ·
1 Parent(s): adf8c1e

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -24
app.py DELETED
@@ -1,24 +0,0 @@
1
- import awesome_streamlit as ast
2
- import streamlit as st
3
- import requests
4
- import time
5
- from transformers import pipeline
6
- import os
7
-
8
-
9
-
10
- sentiment_pipeline = pipeline(task = "text-classification", model = "gritli/bert-sentiment-analyses-imdb")
11
-
12
- st.title("Hate Speech Detection in Turkish")
13
- st.write(" ")
14
- st.write("Enter a sentence to detect its hateful:")
15
-
16
- label_dict = {'LABEL_0': 'Hate', 'LABEL_1': 'Non-hate'}
17
-
18
- user_input = st.text_input("")
19
- if user_input:
20
- result = sentiment_pipeline(user_input)
21
- sentiment = result[0]["label"]
22
-
23
- sentiment = label_dict[sentiment]
24
- st.write(f"Detection: {sentiment}")