Spaces:
Runtime error
Runtime error
work
Browse files- vocal_app.py +11 -3
vocal_app.py
CHANGED
@@ -42,8 +42,9 @@ def page_controller():
|
|
42 |
else:
|
43 |
st.session_state.page = "Page 2"
|
44 |
|
45 |
-
|
46 |
# Page 1
|
|
|
47 |
def page1():
|
48 |
|
49 |
# for local variables
|
@@ -146,9 +147,14 @@ def page1():
|
|
146 |
)
|
147 |
st.write('Information submitted successfully.')
|
148 |
|
|
|
149 |
# Page 2
|
|
|
150 |
def page2():
|
151 |
st.header('Page 2')
|
|
|
|
|
|
|
152 |
tab1, tab2, tab3 = st.tabs(["Tab 1", "Tab 2", "Tab 3"])
|
153 |
|
154 |
with tab1:
|
@@ -164,22 +170,24 @@ def page2():
|
|
164 |
# Insert the code to input sound using mike and convert to text
|
165 |
|
166 |
|
|
|
167 |
# Page Routing
|
|
|
168 |
pages = {
|
169 |
"Page 1": page1,
|
170 |
"Page 2": page2
|
171 |
}
|
172 |
|
|
|
173 |
# Nav Bar
|
|
|
174 |
# st.sidebar.title('Navigation')
|
175 |
#selection = st.sidebar.radio("Go to", list(pages.keys()))
|
176 |
|
177 |
selection = st.session_state.page
|
178 |
-
|
179 |
print("selection:", selection)
|
180 |
|
181 |
page = pages[selection]
|
182 |
-
|
183 |
# Execute selected page function
|
184 |
page()
|
185 |
|
|
|
42 |
else:
|
43 |
st.session_state.page = "Page 2"
|
44 |
|
45 |
+
#########################################################
|
46 |
# Page 1
|
47 |
+
#########################################################
|
48 |
def page1():
|
49 |
|
50 |
# for local variables
|
|
|
147 |
)
|
148 |
st.write('Information submitted successfully.')
|
149 |
|
150 |
+
#########################################################
|
151 |
# Page 2
|
152 |
+
#########################################################
|
153 |
def page2():
|
154 |
st.header('Page 2')
|
155 |
+
|
156 |
+
tab_titles = []
|
157 |
+
|
158 |
tab1, tab2, tab3 = st.tabs(["Tab 1", "Tab 2", "Tab 3"])
|
159 |
|
160 |
with tab1:
|
|
|
170 |
# Insert the code to input sound using mike and convert to text
|
171 |
|
172 |
|
173 |
+
#########################################################
|
174 |
# Page Routing
|
175 |
+
#########################################################
|
176 |
pages = {
|
177 |
"Page 1": page1,
|
178 |
"Page 2": page2
|
179 |
}
|
180 |
|
181 |
+
#########################################################
|
182 |
# Nav Bar
|
183 |
+
#########################################################
|
184 |
# st.sidebar.title('Navigation')
|
185 |
#selection = st.sidebar.radio("Go to", list(pages.keys()))
|
186 |
|
187 |
selection = st.session_state.page
|
|
|
188 |
print("selection:", selection)
|
189 |
|
190 |
page = pages[selection]
|
|
|
191 |
# Execute selected page function
|
192 |
page()
|
193 |
|