Update app.py
Browse files
app.py
CHANGED
@@ -156,6 +156,22 @@ def generate_insights():
|
|
156 |
with use_scope(f'visualization_{i+1}', clear=True):
|
157 |
put_image(img_str, width='100%')
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
def main():
|
160 |
data_analysis_dashboard()
|
161 |
|
|
|
156 |
with use_scope(f'visualization_{i+1}', clear=True):
|
157 |
put_image(img_str, width='100%')
|
158 |
|
159 |
+
def data_analysis_dashboard():
|
160 |
+
put_text("# Data Analysis Dashboard")
|
161 |
+
|
162 |
+
with use_scope('form'):
|
163 |
+
put_row([
|
164 |
+
put_column([
|
165 |
+
file_upload("Upload Dataset", accept=[".csv", ".xlsx"], name="file"),
|
166 |
+
input("Analysis Instructions", type="text", placeholder="Describe the analysis you want...", name="instructions"),
|
167 |
+
put_buttons(['Generate Insights'], onclick=[lambda: generate_insights()])
|
168 |
+
])
|
169 |
+
])
|
170 |
+
|
171 |
+
with use_scope('output'):
|
172 |
+
for i in range(3):
|
173 |
+
put_image(name=f'visualization_{i+1}')
|
174 |
+
|
175 |
def main():
|
176 |
data_analysis_dashboard()
|
177 |
|