Commit
•
8c65d6c
1
Parent(s):
24047b3
Update app.py
Browse files
app.py
CHANGED
@@ -111,33 +111,37 @@ def generate_report(file, type):
|
|
111 |
temp_file3.write(contents.encode('utf-8'))
|
112 |
temp_file3.close()
|
113 |
try:
|
114 |
-
df=AV.AutoViz('/content/insurance.csv')
|
115 |
dft = AV.AutoViz(filename="", sep=',', dfte=df, header=0, verbose=1,
|
116 |
lowess=False,chart_format='html',max_rows_analyzed=150000,
|
117 |
-
max_cols_analyzed=30,save_plot_dir=
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
lowess=False,chart_format='png',max_rows_analyzed=150000,
|
120 |
-
max_cols_analyzed=30,save_plot_dir=
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
except Exception as e:
|
123 |
dfviz=df
|
124 |
print(e)
|
125 |
print('Exception during Autoviz')
|
126 |
|
127 |
-
|
128 |
-
|
129 |
-
for filename in os.listdir(output_dir_html):
|
130 |
-
if filename.endswith(".html"):
|
131 |
-
title = os.path.splitext(filename)[0] # Extract title from filename (without extension)
|
132 |
-
reports.append(title)
|
133 |
-
reports.append(output_dir_html+'/'+filename)
|
134 |
-
imgs = []
|
135 |
-
output_dir_img='plots/Autoviz'
|
136 |
-
for filename in os.listdir(output_dir_img):
|
137 |
-
if filename.endswith(".png"):
|
138 |
-
title = os.path.splitext(filename)[0] # Extract title from filename (without extension)
|
139 |
-
imgs.append(title)
|
140 |
-
imgs.append(output_dir_img+'/'+filename)
|
141 |
while len(reports)<10:
|
142 |
# Comparing the lengths and appending t and m to output if needed
|
143 |
|
|
|
111 |
temp_file3.write(contents.encode('utf-8'))
|
112 |
temp_file3.close()
|
113 |
try:
|
114 |
+
#df=AV.AutoViz('/content/insurance.csv')
|
115 |
dft = AV.AutoViz(filename="", sep=',', dfte=df, header=0, verbose=1,
|
116 |
lowess=False,chart_format='html',max_rows_analyzed=150000,
|
117 |
+
max_cols_analyzed=30,save_plot_dir=None)
|
118 |
+
reports = []
|
119 |
+
output_dir_html='AutoViz'
|
120 |
+
for filename in os.listdir(output_dir_html):
|
121 |
+
if filename.endswith(".html"):
|
122 |
+
title = os.path.splitext(filename)[0] # Extract title from filename (without extension)
|
123 |
+
reports.append(title)
|
124 |
+
reports.append(output_dir_html+'/'+filename)
|
125 |
+
|
126 |
+
dft = AV.AutoViz(filename='', sep=',', header=0, verbose=2,
|
127 |
lowess=False,chart_format='png',max_rows_analyzed=150000,
|
128 |
+
max_cols_analyzed=30,save_plot_dir=None)
|
129 |
+
|
130 |
+
imgs = []
|
131 |
+
output_dir_img='Autoviz'
|
132 |
+
for filename in os.listdir(output_dir_img):
|
133 |
+
if filename.endswith(".png"):
|
134 |
+
title = os.path.splitext(filename)[0] # Extract title from filename (without extension)
|
135 |
+
imgs.append(title)
|
136 |
+
imgs.append(output_dir_img+'/'+filename)
|
137 |
+
|
138 |
except Exception as e:
|
139 |
dfviz=df
|
140 |
print(e)
|
141 |
print('Exception during Autoviz')
|
142 |
|
143 |
+
|
144 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
while len(reports)<10:
|
146 |
# Comparing the lengths and appending t and m to output if needed
|
147 |
|