Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import traceback
|
|
8 |
import os
|
9 |
from pywebio import start_server
|
10 |
from pywebio.input import file_upload, input
|
11 |
-
from pywebio.output import put_text, put_image, put_row, put_column, use_scope, put_buttons
|
12 |
from pywebio.session import set_env
|
13 |
import base64
|
14 |
import threading
|
@@ -140,23 +140,6 @@ def data_analysis_dashboard():
|
|
140 |
for i in range(3):
|
141 |
put_scope(f'visualization_{i+1}')
|
142 |
|
143 |
-
def data_analysis_dashboard():
|
144 |
-
set_env(title="Data Analysis Dashboard")
|
145 |
-
put_text("# Data Analysis Dashboard")
|
146 |
-
|
147 |
-
with use_scope('form'):
|
148 |
-
put_row([
|
149 |
-
put_column([
|
150 |
-
put_file_upload("Upload Dataset", accept=[".csv", ".xlsx"], name="file"),
|
151 |
-
put_input("Analysis Instructions", type="text", placeholder="Describe the analysis you want...", name="instructions"),
|
152 |
-
put_buttons(['Generate Insights'], onclick=[lambda: generate_insights()])
|
153 |
-
])
|
154 |
-
])
|
155 |
-
|
156 |
-
with use_scope('output'):
|
157 |
-
for i in range(3):
|
158 |
-
put_scope(f'visualization_{i+1}')
|
159 |
-
|
160 |
def generate_insights():
|
161 |
file = file_upload.files.get('file')
|
162 |
instructions = input.inputs.get('instructions')
|
|
|
8 |
import os
|
9 |
from pywebio import start_server
|
10 |
from pywebio.input import file_upload, input
|
11 |
+
from pywebio.output import put_text, put_image, put_row, put_column, use_scope, put_buttons
|
12 |
from pywebio.session import set_env
|
13 |
import base64
|
14 |
import threading
|
|
|
140 |
for i in range(3):
|
141 |
put_scope(f'visualization_{i+1}')
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
def generate_insights():
|
144 |
file = file_upload.files.get('file')
|
145 |
instructions = input.inputs.get('instructions')
|