From 8f12cf9cf4c15fa1f9f20c8c36a55be7823b8cf2 Mon Sep 17 00:00:00 2001 From: Arun Kishore <50844460+rpakishore@users.noreply.github.com> Date: Tue, 2 Apr 2024 13:11:58 -0700 Subject: [PATCH] fixed cve --- .streamlit/config.toml | 16 ++++++++-------- pages/1_One-way Slab.py | 14 ++++++-------- requirements.txt | 3 +-- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.streamlit/config.toml b/.streamlit/config.toml index 09191c7..e01e82d 100644 --- a/.streamlit/config.toml +++ b/.streamlit/config.toml @@ -5,7 +5,7 @@ # By default, Streamlit checks if the Python watchdog module is available and, if not, prints a warning asking for you to install it. The watchdog module is not required, but highly recommended. It improves Streamlit's ability to detect changes to files in your filesystem. # If you'd like to turn off this warning, set this to True. # Default: false -disableWatchdogWarning = false +#disableWatchdogWarning = false # If True, will show a warning when you run a Streamlit-enabled script via "python my_script.py". # Default: true @@ -14,7 +14,7 @@ showWarningOnDirectExecution = true # DataFrame serialization. # Acceptable values: - 'legacy': Serialize DataFrames using Streamlit's custom format. Slow but battle-tested. - 'arrow': Serialize DataFrames using Apache Arrow. Much faster and versatile. # Default: "arrow" -dataFrameSerialization = "arrow" +#dataFrameSerialization = "arrow" [logger] @@ -32,11 +32,11 @@ messageFormat = "%(asctime)s %(message)s" # Whether to enable st.cache. # Default: true -caching = true +#caching = true # If false, makes your Streamlit script not draw to a Streamlit app. # Default: true -displayEnabled = true +#displayEnabled = true # Controls whether uncaught app exceptions are displayed in the browser. By default, this is set to True and Streamlit displays app exceptions and associated tracebacks in the browser. # If set to False, an exception will result in a generic message being shown in the browser, and exceptions and tracebacks will be printed to the console only. @@ -52,11 +52,11 @@ magicEnabled = true # Install a Python tracer to allow you to stop or pause your script at any point and introspect it. As a side-effect, this slows down your script's execution. # Default: false -installTracer = false +#installTracer = false # Sets the MPLBACKEND environment variable to Agg inside Streamlit to prevent Python crashing. # Default: true -fixMatplotlib = true +#fixMatplotlib = true # Run the Python Garbage Collector after each script execution. This can help avoid excess memory use in Streamlit apps, but could introduce delay in rerunning the app script for high-memory-use applications. # Default: true @@ -166,11 +166,11 @@ token = "" # Set to false to disable the deprecation warning for the file uploader encoding. # Default: true -showfileUploaderEncoding = true +#showfileUploaderEncoding = true # Set to false to disable the deprecation warning for using the global pyplot instance. # Default: true -showPyplotGlobalUse = true +#showPyplotGlobalUse = true [theme] diff --git a/pages/1_One-way Slab.py b/pages/1_One-way Slab.py index 687fb9c..393dd2d 100644 --- a/pages/1_One-way Slab.py +++ b/pages/1_One-way Slab.py @@ -1,8 +1,6 @@ import streamlit as st from handcalcs.decorator import handcalc from math import sqrt -import pandas as pd -from datetime import datetime import forallpeople forallpeople.environment('structural', top_level=True) from util.streamlit_configs import Page_layout @@ -55,18 +53,18 @@ def add_check(self, title, util): if type(util) != str: if util > 1: - color = "#ff3333" + color = "#EFC3CA" else: - color = "#00FF00" + color = "#C8ECBA" util = round(util*100,1) - self.code += (f"""{title}{util}%""") + self.code += (f"""{title}{util}%""") else: if util.lower().strip().startswith('fail'): - color = "#ff3333" + color = "#EFC3CA" else: - color = "#00FF00" - self.code += (f"""{title}{util}""") + color = "#C8ECBA" + self.code += (f"""{title}{util}""") self.completed_code = None def html(self): diff --git a/requirements.txt b/requirements.txt index 7e29ec2..cb9033c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ handcalcs==1.6.0 -pandas==1.4.3 -streamlit==1.11.0 +streamlit==1.32.0 forallpeople==2.6.2 \ No newline at end of file