Commit
•
24047b3
1
Parent(s):
bc3054f
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ import sweetviz as sv
|
|
7 |
#from datatile.summary.df import DataFrameSummary
|
8 |
from autoviz.AutoViz_Class import AutoViz_Class
|
9 |
from traceml.summary.df import DataFrameSummary
|
|
|
10 |
|
11 |
def variable_table(df):
|
12 |
"""
|
@@ -201,7 +202,7 @@ with gr.Blocks() as cluster:
|
|
201 |
gr.HTML(value="""<h2 style="color: #3399FF; text-shadow: 1px 1px 2px #ddd;">SWEETVIZ REPORT</h2>""")
|
202 |
out2=gr.File(label="Download CSV")
|
203 |
sheet_dropdown = gr.Dropdown(
|
204 |
-
label="Select sheet", choices=[], visible=
|
205 |
)
|
206 |
|
207 |
|
@@ -219,13 +220,7 @@ with gr.Blocks() as cluster:
|
|
219 |
dataframe2=gr.Dataframe()
|
220 |
|
221 |
#Autoviz insights graphs
|
222 |
-
|
223 |
-
gr.HTML(value="""<h1 style="color: #1999FF; text-shadow: 1px 1px 2px #ddd;">EXCEL ANALYSIS AND INSIGHTS</h1>""")
|
224 |
-
with gr.Row():
|
225 |
-
file = gr.File(file_types=['.csv', '.xlsx'], label="Upload a CSV or Excel file")
|
226 |
-
btn = gr.Button("Download Report")
|
227 |
-
# AutoViz report display section
|
228 |
-
#autoviz_reports = gr.Column()
|
229 |
gr.HTML(value="""<h3 style="color: #1999FF; text-shadow: 1px 1px 2px #ddd;">Insight Visualisations</h3>""")
|
230 |
with gr.Column():
|
231 |
plots2 = []
|
@@ -250,4 +245,4 @@ with gr.Blocks() as cluster:
|
|
250 |
btn.click(handle_click, inputs=[file, sheet_dropdown], outputs=[out1, out2, var,dataframe1, dataframe2]+plots1+plots2)
|
251 |
file.change(update_sheets, inputs=file, outputs=sheet_dropdown)
|
252 |
#btn.click(generate_report,inputs=[file],outputs=[out1,out2,var,dataframe1,dataframe2])
|
253 |
-
cluster.launch()
|
|
|
7 |
#from datatile.summary.df import DataFrameSummary
|
8 |
from autoviz.AutoViz_Class import AutoViz_Class
|
9 |
from traceml.summary.df import DataFrameSummary
|
10 |
+
import os
|
11 |
|
12 |
def variable_table(df):
|
13 |
"""
|
|
|
202 |
gr.HTML(value="""<h2 style="color: #3399FF; text-shadow: 1px 1px 2px #ddd;">SWEETVIZ REPORT</h2>""")
|
203 |
out2=gr.File(label="Download CSV")
|
204 |
sheet_dropdown = gr.Dropdown(
|
205 |
+
label="Select sheet", choices=[], visible=False # Initially disabled
|
206 |
)
|
207 |
|
208 |
|
|
|
220 |
dataframe2=gr.Dataframe()
|
221 |
|
222 |
#Autoviz insights graphs
|
223 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
gr.HTML(value="""<h3 style="color: #1999FF; text-shadow: 1px 1px 2px #ddd;">Insight Visualisations</h3>""")
|
225 |
with gr.Column():
|
226 |
plots2 = []
|
|
|
245 |
btn.click(handle_click, inputs=[file, sheet_dropdown], outputs=[out1, out2, var,dataframe1, dataframe2]+plots1+plots2)
|
246 |
file.change(update_sheets, inputs=file, outputs=sheet_dropdown)
|
247 |
#btn.click(generate_report,inputs=[file],outputs=[out1,out2,var,dataframe1,dataframe2])
|
248 |
+
cluster.launch(debug=True)
|