Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ RUN apt-get update && \
apt-get clean;


ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/
RUN export JAVA_HOME
# ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-arm64/
# ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/
RUN export JAVA_HOME="$(dirname $(dirname $(readlink -f $(which java))))"
RUN echo $JAVA_HOME

WORKDIR /usr/src/app
ENV FLASK_APP=./src/app.py
Expand Down
76 changes: 4 additions & 72 deletions example/pipeline_fruit_batch_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,12 @@
],
"visualization": [
{
"name": "untitled1",
"name": "TotalSales",
"type": "Bar Chart",
"input": "srv_fruit_sales_total",
"description": ""
},
{
"name": "untitled2",
"type": "Line Chart",
"input": "srv_fruit_sales_total",
"description": ""
"description": "",
"x_axis": "fruit",
"y_axis": "total"
}
],
"industry": "Other",
Expand Down Expand Up @@ -416,70 +412,6 @@
"total": 17.0
}
]
},
"visualization": {
"untitled1": {
"xAxis": {
"type": "category",
"data": [
"Fiji Apple",
"Green Apple",
"Peach",
"Green Grape",
"Orange",
"Red Grape",
"Banana"
]
},
"yAxis": {
"type": "value"
},
"series": [
{
"data": [
56.0,
45.0,
39.0,
36.0,
28.0,
24.0,
17.0
],
"type": "bar"
}
]
},
"untitled2": {
"xAxis": {
"type": "category",
"data": [
"Fiji Apple",
"Green Apple",
"Peach",
"Green Grape",
"Orange",
"Red Grape",
"Banana"
]
},
"yAxis": {
"type": "value"
},
"series": [
{
"data": [
56.0,
45.0,
39.0,
36.0,
28.0,
24.0,
17.0
],
"type": "line"
}
]
}
}
}
}
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
setuptools
wheel
pandas==1.5.3
numpy==1.23.5
pyarrow
fastparquet
pyspark==3.3.0
Expand Down
972 changes: 438 additions & 534 deletions src/cddp/openai_api.py

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions src/streamlit/pages/1_Editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ def run_task(task_name, stage="standard"):

def delete_task(type, index):
if type == "staging":
# Also sync checkbox status in the AI Assistant page
generated_tables = st.session_state["current_generated_tables"]["generated_tables"]
for table in generated_tables:
if table["table_name"] == current_pipeline_obj['staging'][index]["name"]:
table["staged_flag"] = False
break

del current_pipeline_obj['staging'][index]
elif type == "standard":
del current_pipeline_obj['standard'][index]
Expand Down Expand Up @@ -691,9 +698,9 @@ def clean_vis_data(vis_name):
selected_y_axis_index = 1 if len(cols) > 1 else 0

for j in range(len(cols)):
if cols[j] == current_pipeline_obj['visualization'][i]['x_axis']:
if 'x_axis' in current_pipeline_obj['visualization'] and cols[j] == current_pipeline_obj['visualization'][i]['x_axis']:
selected_x_axis_index = j
if cols[j] == current_pipeline_obj['visualization'][i]['y_axis']:
if 'y_axis' in current_pipeline_obj['visualization'] and cols[j] == current_pipeline_obj['visualization'][i]['y_axis']:
selected_y_axis_index = j

x_axis = st.selectbox('X Axis', cols, key=f'vis_x_axis_{i}', index=selected_x_axis_index)
Expand Down
Loading