From e6e4300c91a2e7003fecf68dad9899612d540980 Mon Sep 17 00:00:00 2001 From: Rajtilak Bhattacharjee Date: Mon, 13 Nov 2023 12:59:47 +0530 Subject: [PATCH] refactor: update Streamlit configurations and README - Modified .streamlit/config.toml to update the theme settings. - Removed download buttons and added Streamlit page configurations in main.py for improved user experience. - Updated README.md to include badges for enhanced project information and visibility. --- .streamlit/config.toml | 6 ++---- README.md | 2 ++ src/main.py | 15 ++++++++++++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.streamlit/config.toml b/.streamlit/config.toml index 44f1602..c344b4f 100644 --- a/.streamlit/config.toml +++ b/.streamlit/config.toml @@ -1,6 +1,4 @@ [theme] -primaryColor="#d33682" -backgroundColor="#002b36" -secondaryBackgroundColor="#586e75" -textColor="#fafafa" +base="dark" +primaryColor="purple" font="sans serif" diff --git a/README.md b/README.md index f408095..acc1915 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ # KeepYourMouthShut + +![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/w/rajtilakjee/keepyourmouthshut) - ![Netlify](https://img.shields.io/netlify/b1b62d2d-3ac1-4559-a94c-445226a2baa1) - ![GitHub](https://img.shields.io/github/license/rajtilakjee/keepyourmouthshut) - ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/rajtilakjee/keepyourmouthshut) - ![GitHub followers](https://img.shields.io/github/followers/rajtilakjee) - ![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/rajtilakjee) diff --git a/src/main.py b/src/main.py index fd38a42..9a5224f 100644 --- a/src/main.py +++ b/src/main.py @@ -162,12 +162,21 @@ def gencast(name, desc, topics, ads): output_file = f"{output_dir}{current_date}_{unique_id}.mp3" podcast.export(output_file, format="mp3") - # Provide Streamlit download button - st.download_button("Download Script", script_file) - st.download_button("Download Audio", podcast) +st.set_page_config( + page_title="KeepYourMouthShut", + page_icon=":speak_no_evil:", + layout="centered", + initial_sidebar_state="expanded", + menu_items={ + 'Get Help': 'https://www.reddit.com/r/KeepYourMouthShut/', + 'Report a bug': "https://github.com/rajtilakjee/keepyourmouthshut/issues", + 'About': "https://www.keepyourmouthshut.net/" + } +) st.title("KeepYourMouthShut") +st.snow() with st.sidebar: openai_api_key = st.text_input("OpenAI API Key", type="password")