Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
import models.hsd_tr
|
9 |
+
import models.hsd_ar
|
10 |
+
|
11 |
+
|
12 |
+
st.set_page_config(
|
13 |
+
page_title="Hate Speech Detection",
|
14 |
+
page_icon="",
|
15 |
+
layout='wide'
|
16 |
+
)
|
17 |
+
|
18 |
+
PAGES = {
|
19 |
+
"HSD in Turkish": models.hsd_tr,
|
20 |
+
"HSD in Arabic": models.hsd_ar
|
21 |
+
|
22 |
+
}
|
23 |
+
|
24 |
+
st.sidebar.title("Models")
|
25 |
+
selection = st.sidebar.radio("Pages", list(PAGES.keys()))
|
26 |
+
|
27 |
+
page = PAGES[selection]
|
28 |
+
st.sidebar.page_link(page)
|
29 |
+
#ast.shared.components.write_page(page)
|
30 |
+
|
31 |
+
#st.sidebar.header("Info")
|