cptsubtext commited on
Commit
802d13a
β€’
1 Parent(s): 496c5b5

Add first layout

Browse files
Files changed (1) hide show
  1. app.py +36 -2
app.py CHANGED
@@ -10,5 +10,39 @@ st.set_page_config(
10
  page_title="Speech-to-Text Transcription App", page_icon="πŸ‘„", layout="wide"
11
  )
12
 
13
- x = st.slider('Select a value')
14
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  page_title="Speech-to-Text Transcription App", page_icon="πŸ‘„", layout="wide"
11
  )
12
 
13
+ def _max_width_():
14
+ max_width_str = f"max-width: 1200px;"
15
+ st.markdown(
16
+ f"""
17
+ <style>
18
+ .reportview-container .main .block-container{{
19
+ {max_width_str}
20
+ }}
21
+ </style>
22
+ """,
23
+ unsafe_allow_html=True,
24
+ )
25
+
26
+ _max_width_()
27
+
28
+ st.image("logo.png", width=350)
29
+
30
+ def main():
31
+ pages = {
32
+ "πŸ‘Ύ Free mode (2MB per API call)": demo,
33
+ "πŸ€— Full mode": API_key,
34
+
35
+ }
36
+
37
+ if "page" not in st.session_state:
38
+ st.session_state.update(
39
+ {
40
+ # Default page
41
+ "page": "Home",
42
+ }
43
+ )
44
+
45
+ with st.sidebar:
46
+ page = st.radio("Select your mode", tuple(pages.keys()))
47
+
48
+ pages[page]()