Spaces:
Sleeping
Sleeping
Atharva Thakur
commited on
Commit
•
af0168b
1
Parent(s):
6b5f571
optimised imports
Browse files- Modules/MLtoolkit.py +2 -7
- app.py +10 -19
Modules/MLtoolkit.py
CHANGED
@@ -1,19 +1,14 @@
|
|
1 |
import numpy as np
|
2 |
import pandas as pd
|
3 |
-
|
4 |
-
from sklearn.model_selection import train_test_split
|
5 |
from sklearn.svm import SVC, SVR
|
6 |
from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
|
7 |
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
|
8 |
from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
|
9 |
from sklearn.naive_bayes import GaussianNB
|
10 |
from sklearn.linear_model import LinearRegression, LogisticRegression
|
11 |
-
|
12 |
-
from sklearn.decomposition import PCA
|
13 |
-
import matplotlib.pyplot as plt
|
14 |
-
import seaborn as sns
|
15 |
import streamlit as st
|
16 |
-
from sklearn.preprocessing import LabelEncoder
|
17 |
|
18 |
|
19 |
class MLToolkit:
|
|
|
1 |
import numpy as np
|
2 |
import pandas as pd
|
3 |
+
|
|
|
4 |
from sklearn.svm import SVC, SVR
|
5 |
from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
|
6 |
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
|
7 |
from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
|
8 |
from sklearn.naive_bayes import GaussianNB
|
9 |
from sklearn.linear_model import LinearRegression, LogisticRegression
|
10 |
+
|
|
|
|
|
|
|
11 |
import streamlit as st
|
|
|
12 |
|
13 |
|
14 |
class MLToolkit:
|
app.py
CHANGED
@@ -1,4 +1,12 @@
|
|
|
|
1 |
import streamlit as st
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
from Modules.data_loader import DataLoader
|
3 |
from Modules.data_analyzer import DataAnalyzer
|
4 |
from Modules.data_filter import DataFilter
|
@@ -6,28 +14,11 @@ from Modules.data_transformer import DataTransformer
|
|
6 |
from Modules.data_visualizer import DataVisualizer
|
7 |
from Modules.data_QA import DataQA
|
8 |
from Modules.MLtoolkit import MLToolkit
|
9 |
-
from sklearn.metrics import mean_squared_error, accuracy_score, mean_absolute_error
|
10 |
-
from sklearn.model_selection import train_test_split
|
11 |
-
import os
|
12 |
-
from streamlit_option_menu import option_menu
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
import pandas as pd
|
17 |
-
from sklearn import datasets
|
18 |
from sklearn.model_selection import train_test_split
|
19 |
-
from sklearn.svm import SVC, SVR
|
20 |
-
from sklearn.neighbors import KNeighborsClassifier, KNeighborsRegressor
|
21 |
-
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
|
22 |
-
from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
|
23 |
-
from sklearn.naive_bayes import GaussianNB
|
24 |
-
from sklearn.linear_model import LinearRegression, LogisticRegression
|
25 |
from sklearn.metrics import mean_squared_error, accuracy_score, mean_absolute_error
|
26 |
-
from sklearn.decomposition import PCA
|
27 |
-
import matplotlib.pyplot as plt
|
28 |
-
import seaborn as sns
|
29 |
-
import streamlit as st
|
30 |
-
from sklearn.preprocessing import LabelEncoder
|
31 |
|
32 |
def main():
|
33 |
st.title('Insights 📶')
|
|
|
1 |
+
#---IMPORTS---
|
2 |
import streamlit as st
|
3 |
+
import numpy as np
|
4 |
+
import pandas as pd
|
5 |
+
import os
|
6 |
+
from streamlit_option_menu import option_menu
|
7 |
+
|
8 |
+
|
9 |
+
#---MODULES IMPORT---
|
10 |
from Modules.data_loader import DataLoader
|
11 |
from Modules.data_analyzer import DataAnalyzer
|
12 |
from Modules.data_filter import DataFilter
|
|
|
14 |
from Modules.data_visualizer import DataVisualizer
|
15 |
from Modules.data_QA import DataQA
|
16 |
from Modules.MLtoolkit import MLToolkit
|
|
|
|
|
|
|
|
|
17 |
|
18 |
+
|
19 |
+
#---SKLEARN-IMPORT---
|
|
|
|
|
20 |
from sklearn.model_selection import train_test_split
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
from sklearn.metrics import mean_squared_error, accuracy_score, mean_absolute_error
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
def main():
|
24 |
st.title('Insights 📶')
|