streamlit-nightly 1.45.1.dev20250429__py3-none-any.whl → 1.45.1.dev20250501__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/cli_util.py +1 -1
- streamlit/commands/page_config.py +1 -1
- streamlit/config.py +3 -3
- streamlit/elements/doc_string.py +24 -3
- streamlit/elements/json.py +13 -0
- streamlit/elements/metric.py +1 -1
- streamlit/elements/progress.py +25 -1
- streamlit/elements/widgets/audio_input.py +21 -0
- streamlit/navigation/page.py +1 -1
- streamlit/proto/AudioInput_pb2.py +4 -3
- streamlit/proto/AudioInput_pb2.pyi +7 -2
- streamlit/proto/DocString_pb2.py +6 -5
- streamlit/proto/DocString_pb2.pyi +9 -1
- streamlit/proto/Json_pb2.py +4 -3
- streamlit/proto/Json_pb2.pyi +9 -2
- streamlit/proto/Progress_pb2.py +4 -3
- streamlit/proto/Progress_pb2.pyi +7 -1
- streamlit/runtime/caching/cache_data_api.py +1 -1
- streamlit/runtime/caching/cache_utils.py +3 -2
- streamlit/runtime/credentials.py +1 -0
- streamlit/runtime/scriptrunner/script_runner.py +4 -4
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.BJh3F07v.js → ErrorOutline.esm.JdVs1Qkg.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.BpUJskrZ.js → FileDownload.esm.BlQJ4vNG.js} +1 -1
- streamlit/static/static/js/{FileHelper.DKXMFthp.js → FileHelper.V4GYCyDu.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.CcbGU8qM.js → FormClearHelper.CyxVAl63.js} +1 -1
- streamlit/static/static/js/{Hooks.CyZIh6nK.js → Hooks.CwzpXjfg.js} +1 -1
- streamlit/static/static/js/{InputInstructions.nbkV1h_d.js → InputInstructions.DLh-ti71.js} +1 -1
- streamlit/static/static/js/{ProgressBar.DeCaMWV9.js → ProgressBar.C7bBETsY.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.D_SwWwav.js → RenderInPortalIfExists.BMvxq2hn.js} +1 -1
- streamlit/static/static/js/{Toolbar.BAN-49vk.js → Toolbar.CotfqUm6.js} +1 -1
- streamlit/static/static/js/{base-input.BGFZMByD.js → base-input.BxaSmpU7.js} +1 -1
- streamlit/static/static/js/{checkbox.B_-BK4qi.js → checkbox.CrglCerk.js} +1 -1
- streamlit/static/static/js/{createSuper.BxyEvip2.js → createSuper.Bs0C396a.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DmJscfNY.js → data-grid-overlay-editor.D0k84F-1.js} +1 -1
- streamlit/static/static/js/{downloader.Cv_h08Sg.js → downloader.BpZrmdUi.js} +1 -1
- streamlit/static/static/js/{es6.BEoJ6t5B.js → es6.DD8ccAPk.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.DnBVl60m.js → iframeResizer.contentWindow.7G5YE4ki.js} +1 -1
- streamlit/static/static/js/{index.C7tk-BaI.js → index.5p5xlu27.js} +1 -1
- streamlit/static/static/js/{index.D39reA1n.js → index.65FBensJ.js} +1 -1
- streamlit/static/static/js/{index.CmBGzoYB.js → index.80LGX7Ne.js} +1 -1
- streamlit/static/static/js/{index.z-3XVs6d.js → index.9sjzZWLH.js} +1 -1
- streamlit/static/static/js/{index.Bnv2GQ1f.js → index.B2lDS5vI.js} +1 -1
- streamlit/static/static/js/{index.Dw_iEQ1s.js → index.B3VXbj_b.js} +1 -1
- streamlit/static/static/js/{index.DbVBJOze.js → index.BDLXYKTS.js} +1 -1
- streamlit/static/static/js/{index.t3xwOrU9.js → index.BF0CTyRa.js} +1 -1
- streamlit/static/static/js/{index.BpqJCHW4.js → index.BI5f0VII.js} +1 -1
- streamlit/static/static/js/{index.CzaH4EJh.js → index.BNhdn2vD.js} +1 -1
- streamlit/static/static/js/{index.DwTevPv_.js → index.BNm3tuep.js} +1 -1
- streamlit/static/static/js/{index.DewKSDBK.js → index.BQqNcnRp.js} +63 -63
- streamlit/static/static/js/{index.Bk2dieuB.js → index.BjKCKyJI.js} +1 -1
- streamlit/static/static/js/{index.iV6t3ri-.js → index.C2kSDT38.js} +1 -1
- streamlit/static/static/js/{index.DipBpxzK.js → index.CMjYL7Ho.js} +1 -1
- streamlit/static/static/js/{index.Dz3G_3mZ.js → index.COBwb1mq.js} +1 -1
- streamlit/static/static/js/{index.BCUsUBov.js → index.COpV4IZK.js} +1 -1
- streamlit/static/static/js/{index.D_Z8_2ei.js → index.Cgzj9ewR.js} +1 -1
- streamlit/static/static/js/{index.DKS3g4Ws.js → index.CkutRj8u.js} +1 -1
- streamlit/static/static/js/{index.BzbL2a8R.js → index.Co5UsG7W.js} +1 -1
- streamlit/static/static/js/{index.BsajPDiD.js → index.CveEeb4Q.js} +1 -1
- streamlit/static/static/js/{index.BooesbgI.js → index.Czzj5-re.js} +1 -1
- streamlit/static/static/js/{index.CRdGuqu3.js → index.D1wWsFMc.js} +1 -1
- streamlit/static/static/js/{index.Bp2P-ne7.js → index.D5GLQoRz.js} +1 -1
- streamlit/static/static/js/{index.DoNPe-YW.js → index.DICnhvRg.js} +1 -1
- streamlit/static/static/js/{index.CWwqcOXB.js → index.DK_eUkea.js} +1 -1
- streamlit/static/static/js/{index.BDoHOUEu.js → index.DM4oCpFy.js} +1 -1
- streamlit/static/static/js/{index.BlpcPmc8.js → index.DO535td0.js} +1 -1
- streamlit/static/static/js/{index.0QGnttRw.js → index.DUF1Zxw6.js} +1 -1
- streamlit/static/static/js/{index.CA2NGDaW.js → index.DW80zFo4.js} +1 -1
- streamlit/static/static/js/{index.CT0nwqsw.js → index.DX2vW3qb.js} +1 -1
- streamlit/static/static/js/{index.tbMYLMrS.js → index.DfgXsqtW.js} +1 -1
- streamlit/static/static/js/{index.7LZxcVw4.js → index.Dq6k7Ztd.js} +1 -1
- streamlit/static/static/js/{index.BBlDwZ3d.js → index.Dz4o-tqP.js} +5 -5
- streamlit/static/static/js/{index.CeEGQX9i.js → index.Olz7Xaf0.js} +1 -1
- streamlit/static/static/js/{index.BJrY61fW.js → index.SARy_Med.js} +1 -1
- streamlit/static/static/js/{index.WP3FKPhV.js → index.rHb0nIsm.js} +1 -1
- streamlit/static/static/js/{input.B2MDikVk.js → input.ChMez782.js} +1 -1
- streamlit/static/static/js/{memory.BCb625DQ.js → memory.DEIZt-uk.js} +1 -1
- streamlit/static/static/js/{mergeWith.COIRyAFl.js → mergeWith.DV3wfmZj.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.2CkzyF3w.js → number-overlay-editor.CVWV51LZ.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.3T2FklLD.js → possibleConstructorReturn.D8SHK4fu.js} +1 -1
- streamlit/static/static/js/{sandbox.Cc6yBPvx.js → sandbox.2Y0eB1Fb.js} +1 -1
- streamlit/static/static/js/{textarea.C7jOKez6.js → textarea.CfOMMQUp.js} +1 -1
- streamlit/static/static/js/{timepicker.BjMKxgZK.js → timepicker.BCEVqM6L.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.BQ7m3eYw.js → toConsumableArray.CgIgbjyR.js} +1 -1
- streamlit/static/static/js/{uniqueId.CJ7dn8nU.js → uniqueId.CasOW7eQ.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.QdMR1Kj8.js → useBasicWidgetState.DM0uW3hG.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.DppkR64F.js → useOnInputChange.C9p9DssL.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.C2Ah-iZc.js → withFullScreenWrapper.Du9h1SFo.js} +1 -1
- streamlit/web/cli.py +1 -1
- streamlit/web/server/browser_websocket_handler.py +5 -0
- streamlit/web/server/oauth_authlib_routes.py +24 -1
- streamlit/web/server/server_util.py +1 -1
- {streamlit_nightly-1.45.1.dev20250429.dist-info → streamlit_nightly-1.45.1.dev20250501.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.45.1.dev20250429.dist-info → streamlit_nightly-1.45.1.dev20250501.dist-info}/RECORD +98 -98
- {streamlit_nightly-1.45.1.dev20250429.dist-info → streamlit_nightly-1.45.1.dev20250501.dist-info}/WHEEL +1 -1
- {streamlit_nightly-1.45.1.dev20250429.data → streamlit_nightly-1.45.1.dev20250501.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.45.1.dev20250429.dist-info → streamlit_nightly-1.45.1.dev20250501.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.45.1.dev20250429.dist-info → streamlit_nightly-1.45.1.dev20250501.dist-info}/top_level.txt +0 -0
streamlit/cli_util.py
CHANGED
@@ -60,7 +60,7 @@ def _open_browser_with_webbrowser(url: str) -> None:
|
|
60
60
|
def _open_browser_with_command(command: str, url: str) -> None:
|
61
61
|
cmd_line = [command, url]
|
62
62
|
with open(os.devnull, "w") as devnull:
|
63
|
-
subprocess.Popen(cmd_line, stdout=devnull, stderr=subprocess.STDOUT)
|
63
|
+
subprocess.Popen(cmd_line, stdout=devnull, stderr=subprocess.STDOUT) # noqa: S603
|
64
64
|
|
65
65
|
|
66
66
|
def open_browser(url: str) -> None:
|
@@ -276,7 +276,7 @@ def set_page_config(
|
|
276
276
|
def get_random_emoji() -> str:
|
277
277
|
# Weigh our emojis 10x, cuz we're awesome!
|
278
278
|
# TODO: fix the random seed with a hash of the user's app code, for stability?
|
279
|
-
return random.choice(RANDOM_EMOJIS + 10 * ENG_EMOJIS)
|
279
|
+
return random.choice(RANDOM_EMOJIS + 10 * ENG_EMOJIS) # noqa: S311
|
280
280
|
|
281
281
|
|
282
282
|
def set_menu_items_proto(lowercase_menu_items, menu_items_proto) -> None:
|
streamlit/config.py
CHANGED
@@ -348,7 +348,7 @@ def _delete_option(key: str) -> None:
|
|
348
348
|
"_config_options should always be populated here."
|
349
349
|
)
|
350
350
|
del _config_options[key]
|
351
|
-
except Exception:
|
351
|
+
except Exception: # noqa: S110
|
352
352
|
# We don't care if the option already doesn't exist.
|
353
353
|
pass
|
354
354
|
|
@@ -1471,12 +1471,12 @@ def _maybe_convert_to_number(v: Any) -> Any:
|
|
1471
1471
|
"""Convert v to int or float, or leave it as is."""
|
1472
1472
|
try:
|
1473
1473
|
return int(v)
|
1474
|
-
except Exception:
|
1474
|
+
except Exception: # noqa: S110
|
1475
1475
|
pass
|
1476
1476
|
|
1477
1477
|
try:
|
1478
1478
|
return float(v)
|
1479
|
-
except Exception:
|
1479
|
+
except Exception: # noqa: S110
|
1480
1480
|
pass
|
1481
1481
|
|
1482
1482
|
return v
|
streamlit/elements/doc_string.py
CHANGED
@@ -24,8 +24,10 @@ import types
|
|
24
24
|
from typing import TYPE_CHECKING, Any, Final, cast
|
25
25
|
|
26
26
|
import streamlit
|
27
|
+
from streamlit.elements.lib.layout_utils import validate_width
|
27
28
|
from streamlit.proto.DocString_pb2 import DocString as DocStringProto
|
28
29
|
from streamlit.proto.DocString_pb2 import Member as MemberProto
|
30
|
+
from streamlit.proto.WidthConfig_pb2 import WidthConfig
|
29
31
|
from streamlit.runtime.metrics_util import gather_metrics
|
30
32
|
from streamlit.runtime.scriptrunner.script_runner import (
|
31
33
|
__file__ as SCRIPTRUNNER_FILENAME, # noqa: N812
|
@@ -35,6 +37,7 @@ from streamlit.string_util import is_mem_address_str
|
|
35
37
|
|
36
38
|
if TYPE_CHECKING:
|
37
39
|
from streamlit.delta_generator import DeltaGenerator
|
40
|
+
from streamlit.elements.lib.layout_utils import WidthWithoutContent
|
38
41
|
|
39
42
|
|
40
43
|
CONFUSING_STREAMLIT_SIG_PREFIXES: Final = ("(element, ",)
|
@@ -42,7 +45,9 @@ CONFUSING_STREAMLIT_SIG_PREFIXES: Final = ("(element, ",)
|
|
42
45
|
|
43
46
|
class HelpMixin:
|
44
47
|
@gather_metrics("help")
|
45
|
-
def help(
|
48
|
+
def help(
|
49
|
+
self, obj: Any = streamlit, *, width: WidthWithoutContent = "stretch"
|
50
|
+
) -> DeltaGenerator:
|
46
51
|
"""Display help and other information for a given object.
|
47
52
|
|
48
53
|
Depending on the type of object that is passed in, this displays the
|
@@ -54,6 +59,9 @@ class HelpMixin:
|
|
54
59
|
obj : any
|
55
60
|
The object whose information should be displayed. If left
|
56
61
|
unspecified, this call will display help for Streamlit itself.
|
62
|
+
width : "stretch" or int
|
63
|
+
The width of the help element. Can be "stretch" to fill the container
|
64
|
+
width, or an integer to specify a fixed width in pixels.
|
57
65
|
|
58
66
|
Example
|
59
67
|
-------
|
@@ -115,7 +123,10 @@ class HelpMixin:
|
|
115
123
|
height: 700px
|
116
124
|
"""
|
117
125
|
doc_string_proto = DocStringProto()
|
118
|
-
|
126
|
+
|
127
|
+
validate_width(width, allow_content=False)
|
128
|
+
_marshall(doc_string_proto, obj, width)
|
129
|
+
|
119
130
|
return self.dg._enqueue("doc_string", doc_string_proto)
|
120
131
|
|
121
132
|
@property
|
@@ -124,7 +135,9 @@ class HelpMixin:
|
|
124
135
|
return cast("DeltaGenerator", self)
|
125
136
|
|
126
137
|
|
127
|
-
def _marshall(
|
138
|
+
def _marshall(
|
139
|
+
doc_string_proto: DocStringProto, obj: Any, width: WidthWithoutContent = "stretch"
|
140
|
+
) -> None:
|
128
141
|
"""Construct a DocString object.
|
129
142
|
|
130
143
|
See DeltaGenerator.help for docs.
|
@@ -146,6 +159,14 @@ def _marshall(doc_string_proto: DocStringProto, obj: Any) -> None:
|
|
146
159
|
|
147
160
|
doc_string_proto.members.extend(_get_members(obj))
|
148
161
|
|
162
|
+
# Set width configuration
|
163
|
+
width_config = WidthConfig()
|
164
|
+
if isinstance(width, int):
|
165
|
+
width_config.pixel_width = width
|
166
|
+
else:
|
167
|
+
width_config.use_stretch = True
|
168
|
+
doc_string_proto.width_config.CopyFrom(width_config)
|
169
|
+
|
149
170
|
|
150
171
|
def _get_name(obj):
|
151
172
|
# Try to get the fully-qualified name of the object.
|
streamlit/elements/json.py
CHANGED
@@ -19,6 +19,7 @@ import types
|
|
19
19
|
from collections import ChainMap, UserDict
|
20
20
|
from typing import TYPE_CHECKING, Any, cast
|
21
21
|
|
22
|
+
from streamlit.elements.lib.layout_utils import WidthWithoutContent, validate_width
|
22
23
|
from streamlit.proto.Json_pb2 import Json as JsonProto
|
23
24
|
from streamlit.runtime.metrics_util import gather_metrics
|
24
25
|
from streamlit.type_util import (
|
@@ -46,6 +47,7 @@ class JsonMixin:
|
|
46
47
|
body: object,
|
47
48
|
*, # keyword-only arguments:
|
48
49
|
expanded: bool | int = True,
|
50
|
+
width: WidthWithoutContent = "stretch",
|
49
51
|
) -> DeltaGenerator:
|
50
52
|
"""Display an object or string as a pretty-printed, interactive JSON string.
|
51
53
|
|
@@ -69,6 +71,11 @@ class JsonMixin:
|
|
69
71
|
Regardless of the initial expansion state, users can collapse or
|
70
72
|
expand any key-value pair to show or hide any part of the object.
|
71
73
|
|
74
|
+
width : "stretch" or int
|
75
|
+
The width of the JSON element. This can be either:
|
76
|
+
- "stretch" (default): The element will stretch to fill the container width
|
77
|
+
- An integer: The element will have a fixed width in pixels
|
78
|
+
|
72
79
|
Example
|
73
80
|
-------
|
74
81
|
>>> import streamlit as st
|
@@ -131,6 +138,12 @@ class JsonMixin:
|
|
131
138
|
", must be bool or int."
|
132
139
|
)
|
133
140
|
|
141
|
+
validate_width(width)
|
142
|
+
if isinstance(width, int):
|
143
|
+
json_proto.width_config.pixel_width = width
|
144
|
+
else:
|
145
|
+
json_proto.width_config.use_stretch = True
|
146
|
+
|
134
147
|
return self.dg._enqueue("json", json_proto)
|
135
148
|
|
136
149
|
@property
|
streamlit/elements/metric.py
CHANGED
@@ -231,7 +231,7 @@ def _parse_value(value: Value) -> str:
|
|
231
231
|
# Item could also be just a variable, so we use try, except
|
232
232
|
if isinstance(value.item(), float) or isinstance(value.item(), int):
|
233
233
|
return str(value.item())
|
234
|
-
except Exception:
|
234
|
+
except Exception: # noqa: S110
|
235
235
|
# If the numpy item is not a valid value, the TypeError below will be raised.
|
236
236
|
pass
|
237
237
|
|
streamlit/elements/progress.py
CHANGED
@@ -19,12 +19,15 @@ from typing import TYPE_CHECKING, Union, cast
|
|
19
19
|
|
20
20
|
from typing_extensions import TypeAlias
|
21
21
|
|
22
|
+
from streamlit.elements.lib.layout_utils import validate_width
|
22
23
|
from streamlit.errors import StreamlitAPIException
|
23
24
|
from streamlit.proto.Progress_pb2 import Progress as ProgressProto
|
25
|
+
from streamlit.proto.WidthConfig_pb2 import WidthConfig
|
24
26
|
from streamlit.string_util import clean_text
|
25
27
|
|
26
28
|
if TYPE_CHECKING:
|
27
29
|
from streamlit.delta_generator import DeltaGenerator
|
30
|
+
from streamlit.elements.lib.layout_utils import WidthWithoutContent
|
28
31
|
|
29
32
|
|
30
33
|
# Currently, equates to just float, but we can't use `numbers.Real` due to
|
@@ -92,7 +95,12 @@ def _get_text(text: str | None) -> str | None:
|
|
92
95
|
|
93
96
|
|
94
97
|
class ProgressMixin:
|
95
|
-
def progress(
|
98
|
+
def progress(
|
99
|
+
self,
|
100
|
+
value: FloatOrInt,
|
101
|
+
text: str | None = None,
|
102
|
+
width: WidthWithoutContent = "stretch",
|
103
|
+
) -> DeltaGenerator:
|
96
104
|
r"""Display a progress bar.
|
97
105
|
|
98
106
|
Parameters
|
@@ -119,6 +127,10 @@ class ProgressMixin:
|
|
119
127
|
.. |st.markdown| replace:: ``st.markdown``
|
120
128
|
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
121
129
|
|
130
|
+
width : int or str
|
131
|
+
The width of the progress bar. Can be either "stretch" to use the full
|
132
|
+
container width, or an integer for a fixed width in pixels.
|
133
|
+
|
122
134
|
Example
|
123
135
|
-------
|
124
136
|
Here is an example of a progress bar increasing over time and disappearing when it reaches completion:
|
@@ -148,6 +160,18 @@ class ProgressMixin:
|
|
148
160
|
text = _get_text(text)
|
149
161
|
if text is not None:
|
150
162
|
progress_proto.text = text
|
163
|
+
|
164
|
+
width_config = WidthConfig()
|
165
|
+
|
166
|
+
validate_width(width)
|
167
|
+
|
168
|
+
if isinstance(width, int):
|
169
|
+
width_config.pixel_width = width
|
170
|
+
else:
|
171
|
+
width_config.use_stretch = True
|
172
|
+
|
173
|
+
progress_proto.width_config.CopyFrom(width_config)
|
174
|
+
|
151
175
|
return self.dg._enqueue("progress", progress_proto)
|
152
176
|
|
153
177
|
@property
|
@@ -22,6 +22,7 @@ from typing_extensions import TypeAlias
|
|
22
22
|
|
23
23
|
from streamlit.elements.lib.file_uploader_utils import enforce_filename_restriction
|
24
24
|
from streamlit.elements.lib.form_utils import current_form_id
|
25
|
+
from streamlit.elements.lib.layout_utils import validate_width
|
25
26
|
from streamlit.elements.lib.policies import (
|
26
27
|
check_widget_policies,
|
27
28
|
maybe_raise_label_warnings,
|
@@ -37,6 +38,7 @@ from streamlit.elements.widgets.file_uploader import _get_upload_files
|
|
37
38
|
from streamlit.proto.AudioInput_pb2 import AudioInput as AudioInputProto
|
38
39
|
from streamlit.proto.Common_pb2 import FileUploaderState as FileUploaderStateProto
|
39
40
|
from streamlit.proto.Common_pb2 import UploadedFileInfo as UploadedFileInfoProto
|
41
|
+
from streamlit.proto.WidthConfig_pb2 import WidthConfig
|
40
42
|
from streamlit.runtime.metrics_util import gather_metrics
|
41
43
|
from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
|
42
44
|
from streamlit.runtime.state import (
|
@@ -49,6 +51,7 @@ from streamlit.runtime.uploaded_file_manager import DeletedFile, UploadedFile
|
|
49
51
|
|
50
52
|
if TYPE_CHECKING:
|
51
53
|
from streamlit.delta_generator import DeltaGenerator
|
54
|
+
from streamlit.elements.lib.layout_utils import WidthWithoutContent
|
52
55
|
|
53
56
|
SomeUploadedAudioFile: TypeAlias = Union[UploadedFile, DeletedFile, None]
|
54
57
|
|
@@ -98,6 +101,7 @@ class AudioInputMixin:
|
|
98
101
|
kwargs: WidgetKwargs | None = None,
|
99
102
|
disabled: bool = False,
|
100
103
|
label_visibility: LabelVisibility = "visible",
|
104
|
+
width: WidthWithoutContent = "stretch",
|
101
105
|
) -> UploadedFile | None:
|
102
106
|
r"""Display a widget that returns an audio recording from the user's microphone.
|
103
107
|
|
@@ -159,6 +163,11 @@ class AudioInputMixin:
|
|
159
163
|
label, which can help keep the widget alligned with other widgets.
|
160
164
|
If this is ``"collapsed"``, Streamlit displays no label or spacer.
|
161
165
|
|
166
|
+
width : "stretch" or int
|
167
|
+
The width of the audio input widget. If "stretch" (default), the widget
|
168
|
+
will take up the full width of its container. If an integer, the width
|
169
|
+
will be set to that number of pixels.
|
170
|
+
|
162
171
|
Returns
|
163
172
|
-------
|
164
173
|
None or UploadedFile
|
@@ -197,6 +206,7 @@ class AudioInputMixin:
|
|
197
206
|
kwargs=kwargs,
|
198
207
|
disabled=disabled,
|
199
208
|
label_visibility=label_visibility,
|
209
|
+
width=width,
|
200
210
|
ctx=ctx,
|
201
211
|
)
|
202
212
|
|
@@ -211,6 +221,7 @@ class AudioInputMixin:
|
|
211
221
|
*, # keyword-only arguments:
|
212
222
|
disabled: bool = False,
|
213
223
|
label_visibility: LabelVisibility = "visible",
|
224
|
+
width: WidthWithoutContent = "stretch",
|
214
225
|
ctx: ScriptRunContext | None = None,
|
215
226
|
) -> UploadedFile | None:
|
216
227
|
key = to_key(key)
|
@@ -230,6 +241,7 @@ class AudioInputMixin:
|
|
230
241
|
form_id=current_form_id(self.dg),
|
231
242
|
label=label,
|
232
243
|
help=help,
|
244
|
+
width=width,
|
233
245
|
)
|
234
246
|
|
235
247
|
audio_input_proto = AudioInputProto()
|
@@ -244,6 +256,15 @@ class AudioInputMixin:
|
|
244
256
|
if label and help is not None:
|
245
257
|
audio_input_proto.help = dedent(help)
|
246
258
|
|
259
|
+
# Set width configuration
|
260
|
+
validate_width(width)
|
261
|
+
width_config = WidthConfig()
|
262
|
+
if isinstance(width, int):
|
263
|
+
width_config.pixel_width = width
|
264
|
+
else:
|
265
|
+
width_config.use_stretch = True
|
266
|
+
audio_input_proto.width_config.CopyFrom(width_config)
|
267
|
+
|
247
268
|
serde = AudioInputSerde()
|
248
269
|
|
249
270
|
audio_input_state = register_widget(
|
streamlit/navigation/page.py
CHANGED
@@ -294,7 +294,7 @@ class StreamlitPage:
|
|
294
294
|
module = types.ModuleType("__main__")
|
295
295
|
# We want __file__ to be the string path to the script
|
296
296
|
module.__dict__["__file__"] = str(self._page)
|
297
|
-
exec(code, module.__dict__)
|
297
|
+
exec(code, module.__dict__) # noqa: S102
|
298
298
|
|
299
299
|
@property
|
300
300
|
def _script_hash(self) -> str:
|
@@ -13,9 +13,10 @@ _sym_db = _symbol_database.Default()
|
|
13
13
|
|
14
14
|
|
15
15
|
from streamlit.proto import LabelVisibilityMessage_pb2 as streamlit_dot_proto_dot_LabelVisibilityMessage__pb2
|
16
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
16
17
|
|
17
18
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/AudioInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\"\
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n streamlit/proto/AudioInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\x1a!streamlit/proto/WidthConfig.proto\"\xb9\x01\n\nAudioInput\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x04 \x01(\t\x12\x10\n\x08\x64isabled\x18\x05 \x01(\x08\x12\x31\n\x10label_visibility\x18\x06 \x01(\x0b\x32\x17.LabelVisibilityMessage\x12,\n\x0cwidth_config\x18\x07 \x01(\x0b\x32\x16.streamlit.WidthConfigB/\n\x1c\x63om.snowflake.apps.streamlitB\x0f\x41udioInputProtob\x06proto3')
|
19
20
|
|
20
21
|
_globals = globals()
|
21
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -23,6 +24,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.AudioInput_
|
|
23
24
|
if not _descriptor._USE_C_DESCRIPTORS:
|
24
25
|
_globals['DESCRIPTOR']._loaded_options = None
|
25
26
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\017AudioInputProto'
|
26
|
-
_globals['_AUDIOINPUT']._serialized_start=
|
27
|
-
_globals['_AUDIOINPUT']._serialized_end=
|
27
|
+
_globals['_AUDIOINPUT']._serialized_start=118
|
28
|
+
_globals['_AUDIOINPUT']._serialized_end=303
|
28
29
|
# @@protoc_insertion_point(module_scope)
|
@@ -21,6 +21,7 @@ import builtins
|
|
21
21
|
import google.protobuf.descriptor
|
22
22
|
import google.protobuf.message
|
23
23
|
import streamlit.proto.LabelVisibilityMessage_pb2
|
24
|
+
import streamlit.proto.WidthConfig_pb2
|
24
25
|
import typing
|
25
26
|
|
26
27
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -35,6 +36,7 @@ class AudioInput(google.protobuf.message.Message):
|
|
35
36
|
FORM_ID_FIELD_NUMBER: builtins.int
|
36
37
|
DISABLED_FIELD_NUMBER: builtins.int
|
37
38
|
LABEL_VISIBILITY_FIELD_NUMBER: builtins.int
|
39
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
38
40
|
id: builtins.str
|
39
41
|
label: builtins.str
|
40
42
|
help: builtins.str
|
@@ -42,6 +44,8 @@ class AudioInput(google.protobuf.message.Message):
|
|
42
44
|
disabled: builtins.bool
|
43
45
|
@property
|
44
46
|
def label_visibility(self) -> streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage: ...
|
47
|
+
@property
|
48
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
45
49
|
def __init__(
|
46
50
|
self,
|
47
51
|
*,
|
@@ -51,8 +55,9 @@ class AudioInput(google.protobuf.message.Message):
|
|
51
55
|
form_id: builtins.str = ...,
|
52
56
|
disabled: builtins.bool = ...,
|
53
57
|
label_visibility: streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage | None = ...,
|
58
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
54
59
|
) -> None: ...
|
55
|
-
def HasField(self, field_name: typing.Literal["label_visibility", b"label_visibility"]) -> builtins.bool: ...
|
56
|
-
def ClearField(self, field_name: typing.Literal["disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility"]) -> None: ...
|
60
|
+
def HasField(self, field_name: typing.Literal["label_visibility", b"label_visibility", "width_config", b"width_config"]) -> builtins.bool: ...
|
61
|
+
def ClearField(self, field_name: typing.Literal["disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "width_config", b"width_config"]) -> None: ...
|
57
62
|
|
58
63
|
global___AudioInput = AudioInput
|
streamlit/proto/DocString_pb2.py
CHANGED
@@ -12,9 +12,10 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
13
13
|
|
14
14
|
|
15
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
15
16
|
|
16
17
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fstreamlit/proto/DocString.proto\"
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fstreamlit/proto/DocString.proto\x1a!streamlit/proto/WidthConfig.proto\"\xa4\x01\n\tDocString\x12\x12\n\ndoc_string\x18\x03 \x01(\t\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\r\n\x05value\x18\x07 \x01(\t\x12\x18\n\x07members\x18\x08 \x03(\x0b\x32\x07.Member\x12,\n\x0cwidth_config\x18\t \x01(\x0b\x32\x16.streamlit.WidthConfigJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x05\x10\x06\"W\n\x06Member\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\x0f\n\x05value\x18\x03 \x01(\tH\x00\x12\x14\n\ndoc_string\x18\x04 \x01(\tH\x00\x42\n\n\x08\x63ontentsB.\n\x1c\x63om.snowflake.apps.streamlitB\x0e\x44ocStringProtob\x06proto3')
|
18
19
|
|
19
20
|
_globals = globals()
|
20
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,8 +23,8 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.DocString_p
|
|
22
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\016DocStringProto'
|
25
|
-
_globals['_DOCSTRING']._serialized_start=
|
26
|
-
_globals['_DOCSTRING']._serialized_end=
|
27
|
-
_globals['_MEMBER']._serialized_start=
|
28
|
-
_globals['_MEMBER']._serialized_end=
|
26
|
+
_globals['_DOCSTRING']._serialized_start=71
|
27
|
+
_globals['_DOCSTRING']._serialized_end=235
|
28
|
+
_globals['_MEMBER']._serialized_start=237
|
29
|
+
_globals['_MEMBER']._serialized_end=324
|
29
30
|
# @@protoc_insertion_point(module_scope)
|
@@ -22,6 +22,7 @@ import collections.abc
|
|
22
22
|
import google.protobuf.descriptor
|
23
23
|
import google.protobuf.internal.containers
|
24
24
|
import google.protobuf.message
|
25
|
+
import streamlit.proto.WidthConfig_pb2
|
25
26
|
import typing
|
26
27
|
|
27
28
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -37,6 +38,7 @@ class DocString(google.protobuf.message.Message):
|
|
37
38
|
NAME_FIELD_NUMBER: builtins.int
|
38
39
|
VALUE_FIELD_NUMBER: builtins.int
|
39
40
|
MEMBERS_FIELD_NUMBER: builtins.int
|
41
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
40
42
|
doc_string: builtins.str
|
41
43
|
"""The doc string."""
|
42
44
|
type: builtins.str
|
@@ -49,6 +51,10 @@ class DocString(google.protobuf.message.Message):
|
|
49
51
|
def members(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Member]:
|
50
52
|
"""List of this object's methods and member variables."""
|
51
53
|
|
54
|
+
@property
|
55
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig:
|
56
|
+
"""Indicates the width setting: "stetch" or a pixel value."""
|
57
|
+
|
52
58
|
def __init__(
|
53
59
|
self,
|
54
60
|
*,
|
@@ -57,8 +63,10 @@ class DocString(google.protobuf.message.Message):
|
|
57
63
|
name: builtins.str = ...,
|
58
64
|
value: builtins.str = ...,
|
59
65
|
members: collections.abc.Iterable[global___Member] | None = ...,
|
66
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
60
67
|
) -> None: ...
|
61
|
-
def
|
68
|
+
def HasField(self, field_name: typing.Literal["width_config", b"width_config"]) -> builtins.bool: ...
|
69
|
+
def ClearField(self, field_name: typing.Literal["doc_string", b"doc_string", "members", b"members", "name", b"name", "type", b"type", "value", b"value", "width_config", b"width_config"]) -> None: ...
|
62
70
|
|
63
71
|
global___DocString = DocString
|
64
72
|
|
streamlit/proto/Json_pb2.py
CHANGED
@@ -12,9 +12,10 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
13
13
|
|
14
14
|
|
15
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
15
16
|
|
16
17
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1astreamlit/proto/Json.proto\"
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1astreamlit/proto/Json.proto\x1a!streamlit/proto/WidthConfig.proto\"\x88\x01\n\x04Json\x12\x0c\n\x04\x62ody\x18\x01 \x01(\t\x12\x10\n\x08\x65xpanded\x18\x02 \x01(\x08\x12\x1d\n\x10max_expand_depth\x18\x03 \x01(\x05H\x00\x88\x01\x01\x12,\n\x0cwidth_config\x18\x04 \x01(\x0b\x32\x16.streamlit.WidthConfigB\x13\n\x11_max_expand_depthB)\n\x1c\x63om.snowflake.apps.streamlitB\tJsonProtob\x06proto3')
|
18
19
|
|
19
20
|
_globals = globals()
|
20
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,6 +23,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.Json_pb2',
|
|
22
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\tJsonProto'
|
25
|
-
_globals['_JSON']._serialized_start=
|
26
|
-
_globals['_JSON']._serialized_end=
|
26
|
+
_globals['_JSON']._serialized_start=66
|
27
|
+
_globals['_JSON']._serialized_end=202
|
27
28
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/Json_pb2.pyi
CHANGED
@@ -20,6 +20,7 @@ limitations under the License.
|
|
20
20
|
import builtins
|
21
21
|
import google.protobuf.descriptor
|
22
22
|
import google.protobuf.message
|
23
|
+
import streamlit.proto.WidthConfig_pb2
|
23
24
|
import typing
|
24
25
|
|
25
26
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -31,6 +32,7 @@ class Json(google.protobuf.message.Message):
|
|
31
32
|
BODY_FIELD_NUMBER: builtins.int
|
32
33
|
EXPANDED_FIELD_NUMBER: builtins.int
|
33
34
|
MAX_EXPAND_DEPTH_FIELD_NUMBER: builtins.int
|
35
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
34
36
|
body: builtins.str
|
35
37
|
"""Content to display."""
|
36
38
|
expanded: builtins.bool
|
@@ -39,15 +41,20 @@ class Json(google.protobuf.message.Message):
|
|
39
41
|
"""
|
40
42
|
max_expand_depth: builtins.int
|
41
43
|
"""The maximum depth to expand the JSON object."""
|
44
|
+
@property
|
45
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig:
|
46
|
+
"""Width configuration"""
|
47
|
+
|
42
48
|
def __init__(
|
43
49
|
self,
|
44
50
|
*,
|
45
51
|
body: builtins.str = ...,
|
46
52
|
expanded: builtins.bool = ...,
|
47
53
|
max_expand_depth: builtins.int | None = ...,
|
54
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
48
55
|
) -> None: ...
|
49
|
-
def HasField(self, field_name: typing.Literal["_max_expand_depth", b"_max_expand_depth", "max_expand_depth", b"max_expand_depth"]) -> builtins.bool: ...
|
50
|
-
def ClearField(self, field_name: typing.Literal["_max_expand_depth", b"_max_expand_depth", "body", b"body", "expanded", b"expanded", "max_expand_depth", b"max_expand_depth"]) -> None: ...
|
56
|
+
def HasField(self, field_name: typing.Literal["_max_expand_depth", b"_max_expand_depth", "max_expand_depth", b"max_expand_depth", "width_config", b"width_config"]) -> builtins.bool: ...
|
57
|
+
def ClearField(self, field_name: typing.Literal["_max_expand_depth", b"_max_expand_depth", "body", b"body", "expanded", b"expanded", "max_expand_depth", b"max_expand_depth", "width_config", b"width_config"]) -> None: ...
|
51
58
|
def WhichOneof(self, oneof_group: typing.Literal["_max_expand_depth", b"_max_expand_depth"]) -> typing.Literal["max_expand_depth"] | None: ...
|
52
59
|
|
53
60
|
global___Json = Json
|
streamlit/proto/Progress_pb2.py
CHANGED
@@ -12,9 +12,10 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
13
13
|
|
14
14
|
|
15
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
15
16
|
|
16
17
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1estreamlit/proto/Progress.proto\"\
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1estreamlit/proto/Progress.proto\x1a!streamlit/proto/WidthConfig.proto\"U\n\x08Progress\x12\r\n\x05value\x18\x01 \x01(\r\x12\x0c\n\x04text\x18\x02 \x01(\t\x12,\n\x0cwidth_config\x18\x03 \x01(\x0b\x32\x16.streamlit.WidthConfigB-\n\x1c\x63om.snowflake.apps.streamlitB\rProgressProtob\x06proto3')
|
18
19
|
|
19
20
|
_globals = globals()
|
20
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,6 +23,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.Progress_pb
|
|
22
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\rProgressProto'
|
25
|
-
_globals['_PROGRESS']._serialized_start=
|
26
|
-
_globals['_PROGRESS']._serialized_end=
|
26
|
+
_globals['_PROGRESS']._serialized_start=69
|
27
|
+
_globals['_PROGRESS']._serialized_end=154
|
27
28
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/Progress_pb2.pyi
CHANGED
@@ -20,6 +20,7 @@ limitations under the License.
|
|
20
20
|
import builtins
|
21
21
|
import google.protobuf.descriptor
|
22
22
|
import google.protobuf.message
|
23
|
+
import streamlit.proto.WidthConfig_pb2
|
23
24
|
import typing
|
24
25
|
|
25
26
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -30,14 +31,19 @@ class Progress(google.protobuf.message.Message):
|
|
30
31
|
|
31
32
|
VALUE_FIELD_NUMBER: builtins.int
|
32
33
|
TEXT_FIELD_NUMBER: builtins.int
|
34
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
33
35
|
value: builtins.int
|
34
36
|
text: builtins.str
|
37
|
+
@property
|
38
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
35
39
|
def __init__(
|
36
40
|
self,
|
37
41
|
*,
|
38
42
|
value: builtins.int = ...,
|
39
43
|
text: builtins.str = ...,
|
44
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
40
45
|
) -> None: ...
|
41
|
-
def
|
46
|
+
def HasField(self, field_name: typing.Literal["width_config", b"width_config"]) -> builtins.bool: ...
|
47
|
+
def ClearField(self, field_name: typing.Literal["text", b"text", "value", b"value", "width_config", b"width_config"]) -> None: ...
|
42
48
|
|
43
49
|
global___Progress = Progress
|
@@ -634,7 +634,7 @@ class DataCache(Cache):
|
|
634
634
|
raise CacheError(str(e)) from e
|
635
635
|
|
636
636
|
try:
|
637
|
-
entry = pickle.loads(pickled_entry)
|
637
|
+
entry = pickle.loads(pickled_entry) # noqa: S301
|
638
638
|
if not isinstance(entry, CachedResult):
|
639
639
|
# Loaded an old cache file format, remove it and let the caller
|
640
640
|
# rerun the function.
|
@@ -473,8 +473,9 @@ def _make_function_key(cache_type: CacheType, func: FunctionType) -> str:
|
|
473
473
|
|
474
474
|
# Include the function's __module__ and __qualname__ strings in the hash.
|
475
475
|
# This means that two identical functions in different modules
|
476
|
-
# will not share a hash
|
477
|
-
# functions in the same module
|
476
|
+
# will not share a hash.
|
477
|
+
# It also means that two identical *nested* functions in the same module
|
478
|
+
# *will* share a hash (see https://github.com/streamlit/streamlit/issues/11157).
|
478
479
|
update_hash(
|
479
480
|
(func.__module__, func.__qualname__),
|
480
481
|
hasher=func_hasher,
|
streamlit/runtime/credentials.py
CHANGED
@@ -635,7 +635,7 @@ class ScriptRunner:
|
|
635
635
|
# inside of a exec_func_with_error_handling call, so
|
636
636
|
# there is a correct handler for these exceptions.
|
637
637
|
raise e
|
638
|
-
except Exception:
|
638
|
+
except Exception: # noqa: S110
|
639
639
|
# Ignore exceptions raised by fragments here as we don't
|
640
640
|
# want to stop the execution of other fragments. The
|
641
641
|
# error itself is already rendered within the wrapped
|
@@ -645,7 +645,7 @@ class ScriptRunner:
|
|
645
645
|
else:
|
646
646
|
if PagesManager.uses_pages_directory:
|
647
647
|
_mpa_v1(self._main_script_path)
|
648
|
-
exec(code, module.__dict__)
|
648
|
+
exec(code, module.__dict__) # noqa: S102
|
649
649
|
self._fragment_storage.clear(
|
650
650
|
new_fragment_ids=ctx.new_fragment_ids
|
651
651
|
)
|
@@ -742,7 +742,7 @@ def _clean_problem_modules() -> None:
|
|
742
742
|
try:
|
743
743
|
keras = sys.modules["keras"]
|
744
744
|
keras.backend.clear_session()
|
745
|
-
except Exception:
|
745
|
+
except Exception: # noqa: S110
|
746
746
|
# We don't want to crash the app if we can't clear the Keras session.
|
747
747
|
pass
|
748
748
|
|
@@ -750,7 +750,7 @@ def _clean_problem_modules() -> None:
|
|
750
750
|
try:
|
751
751
|
plt = sys.modules["matplotlib.pyplot"]
|
752
752
|
plt.close("all")
|
753
|
-
except Exception:
|
753
|
+
except Exception: # noqa: S110
|
754
754
|
# We don't want to crash the app if we can't close matplotlib
|
755
755
|
pass
|
756
756
|
|
streamlit/static/index.html
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
<script>
|
52
52
|
window.prerenderReady = false
|
53
53
|
</script>
|
54
|
-
<script type="module" crossorigin src="./static/js/index.
|
54
|
+
<script type="module" crossorigin src="./static/js/index.BQqNcnRp.js"></script>
|
55
55
|
<link rel="stylesheet" crossorigin href="./static/css/index.C6rq3aMZ.css">
|
56
56
|
</head>
|
57
57
|
<body>
|
@@ -1 +1 @@
|
|
1
|
-
import{r,E as a,_ as n}from"./index.
|
1
|
+
import{r,E as a,_ as n}from"./index.BQqNcnRp.js";var i=r.forwardRef(function(e,t){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(a,n({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),r.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});i.displayName="ErrorOutline";export{i as E};
|