Bootstrap

Python+Steamlit 快速开发可视化机器学习平台

一、相关参考博客

如何用python做一个简单的输入输出交互界面?
https://www.zhihu.com/question/454990715

Steamlit:官网
https://docs.streamlit.io/library/get-started

一小时开发数据分析和机器学习平台(手把手教程,附代码)
https://zhuanlan.zhihu.com/p/216832236

【Python】神器:Streamlit,仅使用Python开发一个运维管理后台(不需要编写html,js,css) 
https://www.cnblogs.com/zhenglisai/p/14844488.html

一个傻瓜式构建可视化 web的 Python 神器 -- streamlit
https://juejin.cn/post/7069361324249219102

Streamlit学习笔记
https://zhuanlan.zhihu.com/p/380482193

Python + Steamlit 快速开发可视化 web 页面!
https://blog.csdn.net/weixin_41846769/article/details/120948822?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522164758549516782248596989%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=164758549516782248596989&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-120948822.142^v2^es_vector_control_group,143^v4^control&utm_term=Steamlit&spm=1018.2226.3001.4187

干货分享 | 用Streamlit来制作数据可视化面板实战
https://blog.csdn.net/weixin_43373042/article/details/118643944?ops_request_misc=&request_id=&biz_id=102&utm_term=Steamlit&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-5-118643944.nonecase&spm=1018.2226.3001.4187

streamlit+matplotlib分析log绘制报表、饼图、折线图
https://blog.csdn.net/linjing0504/article/details/119827825

python︱写markdown一样写网页,代码快速生成web工具:streamlit 数据探索案例(六)
https://mattzheng.blog.csdn.net/article/details/113531457

python︱写markdown一样写网页,代码快速生成web工具:streamlit 重要组件介绍(二)
https://mattzheng.blog.csdn.net/article/details/113485525

二、我的代码

"""
in terminal run: streamlit run main.py
in another terminal run: mlflow ui
"""
import time

import streamlit as st
import pandas as pd
from PIL import Image
from pandas_profiling import ProfileReport
from streamlit_pandas_profiling import st_profile_report
import matplotlib.pyplot as plt
import os
import pycaret.classification as pc_cl
import pycaret.regression as pc_rg
import mlflow
import BiLSTM_VAE_WOA.bilstm_vae_woa as bilstm_vae_woa
from c_e_models.model import main as ce_main
from c_e_models import loss


def get_model_training_logs(n_lines=10):
    file = open('logs.log', 'r')
    lines = file.read().splitlines()
    file.close()
    return lines[-n_lines:]


CHART_LIST = ['折线图', '直方图', '饼图']
ML_TASK_LIST = ['回归', '分类', '自定义模型']
RG_MODEL_LIST = ['lr', 'svm', 'rf', 'xgboost', 'lightgbm']
CL_MODEL_LIST = ['lr', 'dt', 'svm', 'rf', 'xgboost', 'lightgbm']
DE_MODEL_LIST = ['BiLstm_VAE_WOA', 'ITCADenseNet_DITCANet']


def list_files(directory, extension):
    # list certain extension files in the folder
    return [
;