Spaces:
Sleeping
Sleeping
cptsubtext
commited on
Commit
Β·
802d13a
1
Parent(s):
496c5b5
Add first layout
Browse files
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 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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]()
|