-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresult.json
More file actions
1 lines (1 loc) · 2.71 KB
/
result.json
File metadata and controls
1 lines (1 loc) · 2.71 KB
1
{"Sentences": ["\u007fImporting the libraries that we are going to use to develop our model.", "numpy and pandas to manipulate the matrices and data respectively, sklearn.model_selection for splitting data into train and test set and sklearn.linear_model to train our model using LinearRegression.", "pickle to save our trained model to the disk, requests to send requests to the server and json to print the result in our terminal.", "We will save our trained model to the disk using the pickle library.", "Pickle is used to serializing and de-serializing a Python object structure.", "In which python object is converted into the byte stream.", "dump() method dumps the object into the file specified in the arguments.", "In our case, \nHere, we have bounded /api with the method predict().", "In which predict method gets the data from the json passed by the requestor.", "model.predict() method takes input from the json and converts it into 2D numpy array the results are stored into the variable named output and we return this variable after converting it into the json object using flasks jsonify() method.we want to save our model so that it can be used by the server.", "So we will save our object regressor to the file named model.pkl.", "We can again load the model by the following method,"], "Summary": "pickle to save our trained model to the disk, requests to send requests to the server and json to print the result in our terminal.\nmodel.predict() method takes input from the json and converts it into 2D numpy array the results are stored into the variable named output and we return this variable after converting it into the json object using flasks jsonify() method.we want to save our model so that it can be used by the server.", "Nouns": ["libraries", "model", "numpy", "pandas", "matrices", "data", "sklearn.model_selection", "data", "train", "test"], "Verbs": ["\u007fImporting", "are", "going", "use", "develop", "manipulate", "splitting", "train", "using", "save"], "Stems": [["", "import", "librari", "go", "use", "develop", "model", "numpi", "panda", "manipul", "matric", "data", "respect", "sklearnmodelselect", "split", "data", "train", "test", "set", "sklearnlinearmodel", "train", "model", "use", "linearregress", "pickl", "save", "train", "model", "disk", "request", "send", "request", "server", "json", "print", "result", "termin"]], "Lemma": [["", "importing", "library", "going", "use", "develop", "model", "numpy", "panda", "manipulate", "matrix", "data", "respectively", "sklearnmodelselection", "splitting", "data", "train", "test", "set", "sklearnlinearmodel", "train", "model", "using", "linearregression", "pickle", "save", "trained", "model", "disk", "request", "send", "request", "server", "json", "print", "result", "terminal"]]}