SoDehghan commited on
Commit
e820fa6
1 Parent(s): ad9ccca

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -0
app.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ #ast.shared.components.write_page(page)
29
+
30
+ #st.sidebar.header("Info")