Changed streamlit
Browse files
app.py
CHANGED
|
@@ -20,3 +20,10 @@ ax.set_ylabel('Random Number')
|
|
| 20 |
|
| 21 |
# 顯示圖表
|
| 22 |
st.pyplot(fig)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
# 顯示圖表
|
| 22 |
st.pyplot(fig)
|
| 23 |
+
|
| 24 |
+
# 運行 streamlit 應用
|
| 25 |
+
if __name__ == '__main__':
|
| 26 |
+
import os
|
| 27 |
+
port = int(os.environ.get("PORT", 7860))
|
| 28 |
+
st._is_running_with_streamlit = True
|
| 29 |
+
st._run_app('app.py', port=port)
|