Commit
•
88adc6e
1
Parent(s):
ab0b63c
Update app.py
Browse files
app.py
CHANGED
@@ -31,6 +31,7 @@ def generate_report(file, type):
|
|
31 |
return df
|
32 |
|
33 |
df = convert_mixed_to_str(df.copy())
|
|
|
34 |
|
35 |
sweetviz_report = sv.analyze(df)
|
36 |
#sweetviz_report=sweetviz_report.show_html()
|
@@ -82,6 +83,8 @@ def generate_report(file, type):
|
|
82 |
|
83 |
# Applying the style function
|
84 |
sd1 = sd1.style.apply(highlight_cols, axis = None)
|
|
|
|
|
85 |
|
86 |
|
87 |
return temp_file1.name ,temp_file3.name ,dfviz,sd1
|
@@ -104,11 +107,11 @@ with gr.Blocks() as cluster:
|
|
104 |
gr.HTML(value="""<h1 style="color: #3399FF; text-shadow: 1px 1px 2px #ddd;">SWEETVIZ REPORT</h1>""")
|
105 |
out3=gr.File(label="Download CSV")
|
106 |
with gr.Row():
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
btn.click(generate_report,inputs=[file],outputs=[out1,out3,dataframe1,dataframe2])
|
114 |
cluster.launch()
|
|
|
31 |
return df
|
32 |
|
33 |
df = convert_mixed_to_str(df.copy())
|
34 |
+
df.columns = df.columns.str.upper()
|
35 |
|
36 |
sweetviz_report = sv.analyze(df)
|
37 |
#sweetviz_report=sweetviz_report.show_html()
|
|
|
83 |
|
84 |
# Applying the style function
|
85 |
sd1 = sd1.style.apply(highlight_cols, axis = None)
|
86 |
+
sd1.columns = sd1.columns.str.upper()
|
87 |
+
|
88 |
|
89 |
|
90 |
return temp_file1.name ,temp_file3.name ,dfviz,sd1
|
|
|
107 |
gr.HTML(value="""<h1 style="color: #3399FF; text-shadow: 1px 1px 2px #ddd;">SWEETVIZ REPORT</h1>""")
|
108 |
out3=gr.File(label="Download CSV")
|
109 |
with gr.Row():
|
110 |
+
|
111 |
+
gr.Markdown("Uploaded File")
|
112 |
+
dataframe1=gr.Dataframe()
|
113 |
+
with gr.Row():
|
114 |
+
gr.Markdown("Columns Analysis")
|
115 |
+
dataframe2=gr.Dataframe()
|
116 |
btn.click(generate_report,inputs=[file],outputs=[out1,out3,dataframe1,dataframe2])
|
117 |
cluster.launch()
|