Spaces:
Sleeping
Sleeping
KJMAN678
commited on
Commit
•
fee4bd9
1
Parent(s):
ba1c307
プレースホルダーの処理を変更
Browse files- app.py +3 -1
- bul_image_maker.py +1 -3
app.py
CHANGED
@@ -27,8 +27,10 @@ def main():
|
|
27 |
value=30,
|
28 |
)
|
29 |
|
|
|
|
|
30 |
if st.button("処理の実行"):
|
31 |
-
x = bul_image_maker(height, width, times)
|
32 |
st.image(x)
|
33 |
|
34 |
|
|
|
27 |
value=30,
|
28 |
)
|
29 |
|
30 |
+
status_area = st.empty()
|
31 |
+
|
32 |
if st.button("処理の実行"):
|
33 |
+
x = bul_image_maker(height, width, times, status_area)
|
34 |
st.image(x)
|
35 |
|
36 |
|
bul_image_maker.py
CHANGED
@@ -5,7 +5,7 @@ import numpy as np
|
|
5 |
import streamlit as st
|
6 |
|
7 |
|
8 |
-
def bul_image_maker(height: int, width: int, times: int) -> None:
|
9 |
|
10 |
"""
|
11 |
ランダム + 累積和で画像を作って表示する
|
@@ -23,8 +23,6 @@ def bul_image_maker(height: int, width: int, times: int) -> None:
|
|
23 |
|
24 |
im = np.zeros((height, width))
|
25 |
|
26 |
-
status_area = st.empty()
|
27 |
-
|
28 |
for time in range(times):
|
29 |
|
30 |
status_area.write(f"{time}/{times}")
|
|
|
5 |
import streamlit as st
|
6 |
|
7 |
|
8 |
+
def bul_image_maker(height: int, width: int, times: int, status_area) -> None:
|
9 |
|
10 |
"""
|
11 |
ランダム + 累積和で画像を作って表示する
|
|
|
23 |
|
24 |
im = np.zeros((height, width))
|
25 |
|
|
|
|
|
26 |
for time in range(times):
|
27 |
|
28 |
status_area.write(f"{time}/{times}")
|