Rzhishchev commited on
Commit
1920f72
1 Parent(s): 5061eb8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -12
app.py CHANGED
@@ -1,15 +1,12 @@
1
  import streamlit as st
2
- import toxic
3
- import gpt2
4
 
5
- # PAGES = {
6
- # "Toxic Comment Classifier": toxic,
7
- # "GPT-2 Text Generator": gpt2
8
- # }
9
 
10
- st.sidebar.title('Navigation')
11
- selection = st.sidebar.radio("Go to", list(PAGES.keys()))
12
-
13
- page = PAGES[selection]
14
-
15
- page.app()
 
1
  import streamlit as st
2
+ from gpt2 import app as gpt2_app
3
+ from toxic import app as toxic_app
4
 
5
+ # Sidebar for page selection
6
+ page = st.sidebar.selectbox("Choose a page", ["GPT-2", "Toxicity Analysis"])
 
 
7
 
8
+ # Display the selected page
9
+ if page == "GPT-2":
10
+ gpt2_app()
11
+ elif page == "Toxicity Analysis":
12
+ toxic_app()