<commit_before>//General vars
var layersTypes = ["fc","dropout","flat","reshape","conv1","conv2","conv3","maxp1","maxp2","maxp3","avep1","avep2","avep3","rnn","gru","lstm","wembed"];
var kerasLayers = ["Dense","Dropout","Flatten","Reshape","Conv1D","Conv2D","Conv3D","MaxPooling1D","MaxPooling2D","MaxPooling3D","AveragePooling1D","AveragePooling2D","AveragePooling3D","SimpleRNN","GRU","LSTM","Embedding"];
var layers =  new Array();
var layersOutput = new Array();
var layersParameters = new Array();

function getPar( str, par){
	var pos = str.indexOf(par);
	if(pos == -1)return -1;
	str = str.slice(str.indexOf(par)+par.length,str.length);
	if(str.indexOf(",")){
		str=str.slice(0,str.indexOf(","))
	}else{
		str=str.slice(0,str.indexOf(")"))
	}
	
	return str
}

function getArrayPar( str, par){
	var pos = str.indexOf(par);
	if(pos == -1)return -1;
	str = str.slice(str.indexOf(par)+par.length,str.length);
	str = str.slice(str.indexOf("("),str.indexOf(")")+1)
	return str
}

$("#btn").click(function(){
  layers = ["input"];
  layersOutput = new Array();
  layersParameters = new Array();
  var p = $(".enter_stuff").val();
  var e = $('input[type="radio"]:checked').val();
  switch(e){
    case "plaintxt":
    getText(p);
    break;
    case "keras":
    getKeras(p);
    break;
    case "tflearn":
    getTFlearn(p);
    break;
  }
  console.log(layers)
  console.log(layersOutput)
  console.log(layersParameters)
	
  buildChart(layers,layersOutput,layersParameters);
});
<commit_msg>Update main.js<commit_after>//General vars
var layersTypes = ["fc","dropout","flat","reshape","conv1","conv2","conv3","maxp1","maxp2","maxp3","avep1","avep2","avep3","rnn","gru","lstm","wembed"];
var kerasLayers = ["Dense","Dropout","Flatten","Reshape","Conv1D","Conv2D","Conv3D","MaxPooling1D","MaxPooling2D","MaxPooling3D","AveragePooling1D","AveragePooling2D","AveragePooling3D","SimpleRNN","GRU","LSTM","Embedding"];
var layers =  new Array();
var layersOutput = new Array();
var layersParameters = new Array();

function getPar( str, par){
	var pos = str.indexOf(par);
	if(pos == -1)return -1;
	str = str.slice(str.indexOf(par)+par.length,str.length);
	if(str.indexOf(",")){
		str=str.slice(0,str.indexOf(","))
	}else{
		str=str.slice(0,str.indexOf(")"))
	}
	
	return str
}

function getArrayPar( str, par){
	var pos = str.indexOf(par);
	if(pos == -1)return -1;
	str = str.slice(str.indexOf(par)+par.length,str.length);
	str = str.slice(str.indexOf("("),str.indexOf(")")+1)
	return str
}

$(".press").click(function(){
  layers = ["input"];
  layersOutput = new Array();
  layersParameters = new Array();
  var p = $(".enter_stuff").val();
  var e = $('input[type="radio"]:checked').val();
  switch(e){
    case "plaintxt":
    getText(p);
    break;
    case "keras":
    getKeras(p);
    break;
    case "tflearn":
    getTFlearn(p);
    break;
  }
  console.log(layers)
  console.log(layersOutput)
  console.log(layersParameters)
	
  buildChart(layers,layersOutput,layersParameters);
});

{'fraction_non_alphanumeric': 0.22047507527601204, 'fraction_numerical': 0.01672800267648043, 'mean_word_length': 5.7040358744394615, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '450464', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1093, 'n_words': 173}