File size: 1,208 Bytes
b6aa467
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
36
37
38
39
40
41
42
43
import streamlit as st
import torch
import requests
import time
import numpy as np
import os
from toxic1 import toxicity_page
from strim_nlp import classic_ml_page
from lstm import lstm_model_page
from bert_strim import bert_model_page


def app_description_page():
    st.title("Welcome to My App!")
    st.write("This is a Streamlit application where you can explore two different models.")

def model_selection_page():
    st.sidebar.title("Model Selection")
    selected_model = st.sidebar.radio("Select a model", ("Classic ML", "LSTM", "BERT"))
    
    if selected_model == "Classic ML":
        classic_ml_page()
        st.write("You selected Classic ML.")
    elif selected_model == "LSTM":
        lstm_model_page()
        st.write("You selected LSTM.")
    elif selected_model == "BERT":
        bert_model_page()
        st.write("You selected BERT.")
    
def main():
    page = st.sidebar.radio("Go to", ("App Description", "Model Selection", "Toxicity Model"))

    if page == "App Description":
        app_description_page()
    elif page == "Model Selection":
        model_selection_page()
    elif page == "Toxicity Model":
        toxicity_page()

if __name__ == "__main__":
    main()