Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyeh committed Jul 8, 2024
1 parent 84f4e9e commit b707f4b
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions wren-ai-service/eval/data_curation/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,22 @@ def on_click_remove_candidate_dataset_button(i: int):
st.session_state["candidate_dataset"].pop(i)


st.file_uploader(
f"Upload an MDL json file, and the file name must be [xxx]_[datasource]_mdl.json, now we support these datasources: {DATA_SOURCES}",
type="json",
key="uploaded_mdl_file",
on_change=on_click_setup_uploaded_file,
)


tab_create_dataset, tab_modify_dataset = st.tabs(
["Create New Evaluation Dataset", "Modify Saved Evaluation Dataset"]
)
with tab_create_dataset:
st.markdown(
"""
### Usage Guide
1. Use Wren AI AI Service Demo site to deploy the MDL model first and make sure it's deployed successfully
1. Upload an MDL json file first
2. Get question-sql-pairs given by LLM or you manually enter question and corresponding sql
3. Do validation on each group of question, context and SQL, and move it to the candidate dataset if you think it's valid
3. Save the candidate dataset by clicking the "Save as Evaluation Dataset" button.
Expand All @@ -191,7 +199,7 @@ def on_click_remove_candidate_dataset_button(i: int):
st.markdown(
"""
### Usage Guide
1. Use Wren AI AI Service Demo site to deploy the MDL model first and make sure it's deployed successfully
1. Upload an MDL json file first
2. Upload the evaluation dataset(`.toml` file) you want to modify, and please make sure the model in the dataset is the same as the deployed model
3. Modify the evaluation dataset the same as you create a new one
4. Save the candidate dataset by clicking the "Save as Evaluation Dataset" button.
Expand All @@ -206,16 +214,9 @@ def on_click_remove_candidate_dataset_button(i: int):
type="toml",
key="uploaded_eval_file",
on_change=on_change_upload_eval_dataset,
disabled=st.session_state["mdl_json"] is None,
)


st.file_uploader(
f"Upload an MDL json file, and the file name must be [xxx]_[datasource]_mdl.json, now we support these datasources: {DATA_SOURCES}",
type="json",
key="uploaded_mdl_file",
on_change=on_click_setup_uploaded_file,
)

if st.session_state["mdl_json"] is not None:
col1, col2 = st.columns(2)
with col1:
Expand Down

0 comments on commit b707f4b

Please sign in to comment.