Update app.py
Browse files
app.py
CHANGED
|
@@ -8,8 +8,7 @@ def generate_report(file,type):
|
|
| 8 |
df = pd.read_csv(file) if file.name.endswith(".csv") else pd.read_excel(file)
|
| 9 |
if type == "pandas profiling":
|
| 10 |
return ydata_profiling.ProfileReport(df).to_html()
|
| 11 |
-
|
| 12 |
-
return show(df)
|
| 13 |
elif type == "sweetviz":
|
| 14 |
return sv.analyze(global_df).show_html()
|
| 15 |
|
|
@@ -19,9 +18,9 @@ def generate_report(file,type):
|
|
| 19 |
iface = gr.Interface(
|
| 20 |
generate_report,
|
| 21 |
[gr.File(file_types=['.csv','.xlsx'], label="Upload a CSV or Excel file"),
|
| 22 |
-
gr.Radio(["pandas profiling", "
|
| 23 |
"html",
|
| 24 |
-
title="
|
| 25 |
live=True,
|
| 26 |
)
|
| 27 |
|
|
|
|
| 8 |
df = pd.read_csv(file) if file.name.endswith(".csv") else pd.read_excel(file)
|
| 9 |
if type == "pandas profiling":
|
| 10 |
return ydata_profiling.ProfileReport(df).to_html()
|
| 11 |
+
|
|
|
|
| 12 |
elif type == "sweetviz":
|
| 13 |
return sv.analyze(global_df).show_html()
|
| 14 |
|
|
|
|
| 18 |
iface = gr.Interface(
|
| 19 |
generate_report,
|
| 20 |
[gr.File(file_types=['.csv','.xlsx'], label="Upload a CSV or Excel file"),
|
| 21 |
+
gr.Radio(["pandas profiling", "sweetviz"], label="Type of report", info="Explore the data")],
|
| 22 |
"html",
|
| 23 |
+
title="Excel sheet Profiling Report",
|
| 24 |
live=True,
|
| 25 |
)
|
| 26 |
|