Skip to content

Commit

Permalink
fixed cve
Browse files Browse the repository at this point in the history
  • Loading branch information
rpakishore committed Apr 2, 2024
1 parent 7429207 commit 8f12cf9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
16 changes: 8 additions & 8 deletions .streamlit/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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]
Expand Down
14 changes: 6 additions & 8 deletions pages/1_One-way Slab.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"""<tr><td>{title}</td><td style="text-align: center;"><span style="background-color:{color};">{util}%</span></td></tr>""")
self.code += (f"""<tr><td>{title}</td><td style="text-align: center;background-color:{color};"><span>{util}%</span></td></tr>""")

else:
if util.lower().strip().startswith('fail'):
color = "#ff3333"
color = "#EFC3CA"
else:
color = "#00FF00"
self.code += (f"""<tr><td>{title}</td><td style="text-align: center;"><span style="background-color:{color};">{util}</span></td></tr>""")
color = "#C8ECBA"
self.code += (f"""<tr><td>{title}</td><td style="text-align: center;background-color:{color};"><span>{util}</span></td></tr>""")
self.completed_code = None

def html(self):
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
handcalcs==1.6.0
pandas==1.4.3
streamlit==1.11.0
streamlit==1.32.0
forallpeople==2.6.2

0 comments on commit 8f12cf9

Please sign in to comment.