Spaces:
Sleeping
Sleeping
File size: 1,096 Bytes
e1d7fc7 f9b8c48 c42e7a7 e1d7fc7 95ed641 e1d7fc7 f9b8c48 c42e7a7 e1d7fc7 be5ff5d 1c2b244 3f45912 |
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 26 27 28 29 30 31 32 33 34 |
import awesome_streamlit as ast
import streamlit as st
import requests
import time
from transformers import pipeline
import os
import models.home
import models.hsd_tr
import models.hsd_ar
st.set_page_config(
page_title="Hate Speech Detection",
page_icon="📖",
layout='wide'
)
PAGES = {
"Home": models.home,
"HSD in Turkish": models.hsd_tr,
"HSD in Arabic": models.hsd_ar
}
st.sidebar.title("Navigation")
selection = st.sidebar.radio("Pages", list(PAGES.keys()))
page = PAGES[selection]
# with st.spinner(f"Loading {selection} ..."):
ast.shared.components.write_page(page)
st.sidebar.header("Info")
#st.sidebar.write('This tool is developed in the context of the EU project "Utilizing Digital Technology for Social Cohesion, Positive Messaging and Peace by Boosting Collaboration, Exchange and Solidarity" (EuropeAid/170389/DD/ACT/Multi) by [Sabanci University Center of Excellence in Data Analytics](https://github.com/verimsu).')
st.sidebar.write("Models are available on [HF Hub](https://huggingface.co/SoDehghan/BERTurk-hate-speech)") |