<commit_before>//initialize all needed variables(id of buttons)
var functionalities = ["Forecasting","Anomaly","Simulation"];
var models = ["Prophet", "ARIMA","Deep_learning_models","Machine_learning_models"];
var ais = ["pytorch", "tensorflow"];
var oss=["linux", "win"];
var automls=["automlyes", "automlno"];
var inferences=["inferenceyes", "inferenceno"];
var hardwares=["singlenode", "cluster"];
var packages=["pypi", "docker"];
var versions=["stable", "nightly"];

//defalut selected burttons' ids
var functionality="Forecasting";
var model="Deep_learning_models";
var ai="pytorch";
var os="linux";
var automl="automlno";
var inference="inferenceno";
var hardware="singlenode";
var package="pypi";
var version="nightly";

//main func, to decide what is showed in cmd 
function refresh_cmd(){
    //refresh all the buttons
    reset_color(functionalities);
    reset_color(ais);
    reset_color(oss);
    reset_color(automls);
    reset_color(inferences);
    reset_color(hardwares);
    reset_color(packages);
    reset_color(versions);
    
    set_color(functionality);
    set_color(ai);
    set_color(os);
    set_color(automl);
    set_color(inference);
    set_color(hardware);
    set_color(package);
    set_color(version);
    
    var cmd = "NA";

    //dynamically set 'model' line
    $("#model").empty();
    if(functionality=="Forecasting"){
        $("#model").append("<td colspan='1'>Model</td>\
        <td colspan='1'><button id='Deep_learning_models'>Deep learning models</button></td>\
        <td colspan='2'><button id='Prophet'>Prophet</button></td>\
        <td colspan='1'><button id='ARIMA'>ARIMA</button></td>");
    }
    else if(functionality=="Anomaly"){
        $("#model").append("<td colspan='1'>Model</td>\
        <td colspan='2'><button id='Deep_learning_models'>Deep learning models</button>\
        <td colspan='2'><button id='Machine_learning_models'>Machine learning models</button></td>");
    }
    else if(functionality=="Simulation"){
        $("#model").append("<td colspan='1'>Model</td>\
        <td colspan='4'><button id='Deep_learning_models'>Deep learning models</button>");
    }
    reset_color(models);
    set_color(model);

    //enable 'Deep learning framework' when Deep learning models is selected
    if(model!="Deep_learning_models"){
        disable(ais);
    }
    else{
        enable(ais);
    }

    if(version!="nightly"){
        disable(inferences);
    }
    else{
        enable(inferences);
    }


    //disable other buttons in cases
    if(package=="docker"){
        disable(functionalities);
        disable(models);
        disable(ais);
        disable(versions);
        disable(oss);
        disable(inferences);
        disable(hardwares);
        disable(automls);
        cmd="Please refer to <a href=' https://github.com/intel-analytics/BigDL/tree/main/docker/chronos-nightly'>docker installation guide.</a>";
    }else{
        enable(functionalities);
        enable(models);
        enable(versions);
        enable(oss);
        enable(inferences);
        enable(packages);
        enable(hardwares);
        enable(automls);

        //change cmd according to different choices
        if(model=="Deep_learning_models"){
            if(ai=="pytorch"){
                if(inference=="inferenceno"){
                    if(automl=="automlno"){
                        if(hardware=="singlenode"){
                            if(version=="nightly"){
                                cmd="pip install --pre --upgrade bigdl-chronos[pytorch]";
                            }else if(version=="stable"){
                                if(os=="win"){
                                    cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
                                }
                                else{
                                    cmd="pip install bigdl-chronos[pytorch]";
                                }
                            }
                        }else if(hardware=="cluster"){
                            if(os=="win"){
                                cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
                            }
                            else{
                                if(version=="nightly"){
                                    cmd="pip install --pre --upgrade bigdl-chronos[pytorch,distributed]";
                                }else if(version=="stable"){
                                    cmd="pip install bigdl-chronos[pytorch,distributed]";
                                }
                            }
                        }<commit_msg>Chronos: Fix the installation panel display error (#6767)<commit_after>//initialize all needed variables(id of buttons)
var functionalities = ["Forecasting","Anomaly","Simulation"];
var models = ["Prophet", "ARIMA","Deep_learning_models","Machine_learning_models"];
var ais = ["pytorch", "tensorflow"];
var oss=["linux", "win"];
var automls=["automlyes", "automlno"];
var inferences=["inferenceyes", "inferenceno"];
var hardwares=["singlenode", "cluster"];
var packages=["pypi", "docker"];
var versions=["stable", "nightly"];

//defalut selected burttons' ids
var functionality="Forecasting";
var model="Deep_learning_models";
var ai="pytorch";
var os="linux";
var automl="automlno";
var inference="inferenceno";
var hardware="singlenode";
var package="pypi";
var version="nightly";

//main func, to decide what is showed in cmd 
function refresh_cmd(){
    //refresh all the buttons
    reset_color(functionalities);
    reset_color(ais);
    reset_color(oss);
    reset_color(automls);
    reset_color(inferences);
    reset_color(hardwares);
    reset_color(packages);
    reset_color(versions);
    
    set_color(functionality);
    set_color(ai);
    set_color(os);
    set_color(automl);
    set_color(inference);
    set_color(hardware);
    set_color(package);
    set_color(version);
    
    var cmd = "NA";

    //dynamically set 'model' line
    $("#model").empty();
    if(functionality=="Forecasting"){
        $("#model").append("<td colspan='1'>Model</td>\
        <td colspan='1'><button id='Deep_learning_models'>Deep learning models</button></td>\
        <td colspan='2'><button id='Prophet'>Prophet</button></td>\
        <td colspan='1'><button id='ARIMA'>ARIMA</button></td>");
    }
    else if(functionality=="Anomaly"){
        $("#model").append("<td colspan='1'>Model</td>\
        <td colspan='2'><button id='Deep_learning_models'>Deep learning models</button>\
        <td colspan='2'><button id='Machine_learning_models'>Machine learning models</button></td>");
    }
    else if(functionality=="Simulation"){
        $("#model").append("<td colspan='1'>Model</td>\
        <td colspan='4'><button id='Deep_learning_models'>Deep learning models</button>");
    }
    reset_color(models);
    set_color(model);

    //enable 'Deep learning framework' when Deep learning models is selected
    if(model!="Deep_learning_models"){
        disable(ais);
    }
    else{
        enable(ais);
    }

    //disable other buttons in cases
    if(package=="docker"){
        disable(functionalities);
        disable(models);
        disable(ais);
        disable(versions);
        disable(oss);
        disable(inferences);
        disable(hardwares);
        disable(automls);
        cmd="Please refer to <a href=' https://github.com/intel-analytics/BigDL/tree/main/docker/chronos-nightly'>docker installation guide.</a>";
    }else{
        enable(functionalities);
        enable(models);
        enable(versions);
        enable(oss);
        enable(inferences);
        enable(packages);
        enable(hardwares);
        enable(automls);

    if(version!="nightly"){
        disable(inferences);
    }
    else{
        enable(inferences);
    }

        //change cmd according to different choices
        if(model=="Deep_learning_models"){
            if(ai=="pytorch"){
                if(inference=="inferenceno"){
                    if(automl=="automlno"){
                        if(hardware=="singlenode"){
                            if(version=="nightly"){
                                cmd="pip install --pre --upgrade bigdl-chronos[pytorch]";
                            }else if(version=="stable"){
                                if(os=="win"){
                                    cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
                                }
                                else{
                                    cmd="pip install bigdl-chronos[pytorch]";
                                }
                            }
                        }else if(hardware=="cluster"){
                            if(os=="win"){
                                cmd="Not supported, please refer to <a href='https://bigdl.readthedocs.io/en/latest/doc/Chronos/Howto/windows_guide.html'>windows_guide.</a>";
                            }
                            else{
                                if(version=="nightly"){
                                    cmd="pip install --pre --upgrade bigdl-chronos[pytorch,distributed]";
                                }else if(version=="stable"){
                                    cmd="pip install bigdl-chronos[pytorch,distributed]";
                                }
                            }
                        }
{'fraction_non_alphanumeric': 0.14697616321432289, 'fraction_numerical': 0.0022899968772769857, 'mean_word_length': 2.138843515191114, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2403714', 'n_tokens_mistral': 2786, 'n_tokens_neox': 2653, 'n_words': 481}