Sangjun2 commited on
Commit
e55f9df
ยท
verified ยท
1 Parent(s): 1ec3afd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -966,7 +966,7 @@ def update_results(selected_models):
966
  visibility = [False] * 9
967
 
968
  # Update visibility based on the selected models
969
- if "ko_deplot" in selected_models:
970
  visibility[0] = True # ko_deplot_generated_table
971
  visibility[1] = True # ko_deplot_score_table
972
  visibility[6] = True # ko_deplot_label_table
@@ -976,7 +976,7 @@ def update_results(selected_models):
976
  visibility[3] = True # aihub_deplot_score_table
977
  visibility[7] = True # aihub_deplot_label_table
978
  '''
979
- if "unichart" in selected_models:
980
  visibility[4] = True # unichart_generated_table
981
  visibility[5] = True # unichart_score_table
982
  visibility[8] = True # unichart_label_table
@@ -1067,7 +1067,7 @@ with gr.Blocks(css=css) as iface:
1067
  file_uploader= gr.File(file_count="single", file_types=[".txt"], visible=False)
1068
  file_upload_option=gr.Radio(choices=["low score ์ฐจํŠธ","high score ์ฐจํŠธ"],label="ํŒŒ์ผ ์—…๋กœ๋“œ ์˜ต์…˜",visible=False)
1069
  chart_type = gr.Dropdown(["์ผ๋ฐ˜ ๊ฐ€๋กœ ๋ง‰๋Œ€ํ˜•","๋ˆ„์  ๊ฐ€๋กœ ๋ง‰๋Œ€ํ˜•","100% ๊ธฐ์ค€ ๋ˆ„์  ๊ฐ€๋กœ ๋ง‰๋Œ€ํ˜•", "์ผ๋ฐ˜ ์„ธ๋กœ ๋ง‰๋Œ€ํ˜•","๋ˆ„์  ์„ธ๋กœ ๋ง‰๋Œ€ํ˜•","100% ๊ธฐ์ค€ ๋ˆ„์  ์„ธ๋กœ ๋ง‰๋Œ€ํ˜•","์„ ํ˜•", "์›ํ˜•", "๊ธฐํƒ€ ๋ฐฉ์‚ฌํ˜•", "๊ธฐํƒ€ ํ˜ผํ•ฉํ˜•", "์ „์ฒด"], label="Chart Type", value="all")
1070
- model_type=gr.Dropdown(["vaiv_deplot","unichart","all"],label="model",multiselect=True)
1071
  image_displayer=gr.Image(visible=True)
1072
  with gr.Row():
1073
  pre_button=gr.Button("์ด์ „",interactive="False")
@@ -1077,17 +1077,17 @@ with gr.Blocks(css=css) as iface:
1077
  #file_button.click(interface_selector, inputs=gr.State("ํŒŒ์ผ ์—…๋กœ๋“œ"), outputs=[image_uploader, file_uploader,mode,mode_label,image_name])
1078
  inference_button=gr.Button("์ถ”๋ก ")
1079
  with gr.Column():
1080
- ko_deplot_generated_table=gr.DataFrame(visible=False,label="vaiv-deplot ์ถ”๋ก  ๊ฒฐ๊ณผ",elem_classes="dataframe-class")
1081
  aihub_deplot_generated_table=gr.DataFrame(visible=False,label="aihub-deplot ์ถ”๋ก  ๊ฒฐ๊ณผ",elem_classes="dataframe-class")
1082
- unichart_generated_table=gr.DataFrame(visible=False,label="unichart ์ถ”๋ก  ๊ฒฐ๊ณผ",elem_classes="dataframe-class")
1083
  with gr.Column():
1084
- ko_deplot_label_table=gr.DataFrame(visible=False,label="vaiv-deplot ์ •๋‹ตํ…Œ์ด๋ธ”",elem_classes="dataframe-class")
1085
  aihub_deplot_label_table=gr.DataFrame(visible=False,label="aihub-deplot ์ •๋‹ตํ…Œ์ด๋ธ”",elem_classes="dataframe-class")
1086
- unichart_label_table=gr.DataFrame(visible=False,label="unichart ์ •๋‹ตํ…Œ์ด๋ธ”",elem_classes="dataframe-class")
1087
  with gr.Column():
1088
- ko_deplot_score_table=gr.DataFrame(visible=False,label="vaiv_deplot ์ ์ˆ˜",elem_classes="dataframe-class")
1089
  aihub_deplot_score_table=gr.DataFrame(visible=False,label="aihub_deplot ์ ์ˆ˜",elem_classes="dataframe-class")
1090
- unichart_score_table=gr.DataFrame(visible=False,label="unichart ์ ์ˆ˜",elem_classes="dataframe-class")
1091
  model_type.change(
1092
  update_results,
1093
  inputs=[model_type],
 
966
  visibility = [False] * 9
967
 
968
  # Update visibility based on the selected models
969
+ if "VAIV_DePlot" in selected_models:
970
  visibility[0] = True # ko_deplot_generated_table
971
  visibility[1] = True # ko_deplot_score_table
972
  visibility[6] = True # ko_deplot_label_table
 
976
  visibility[3] = True # aihub_deplot_score_table
977
  visibility[7] = True # aihub_deplot_label_table
978
  '''
979
+ if "VAIV_UniChart" in selected_models:
980
  visibility[4] = True # unichart_generated_table
981
  visibility[5] = True # unichart_score_table
982
  visibility[8] = True # unichart_label_table
 
1067
  file_uploader= gr.File(file_count="single", file_types=[".txt"], visible=False)
1068
  file_upload_option=gr.Radio(choices=["low score ์ฐจํŠธ","high score ์ฐจํŠธ"],label="ํŒŒ์ผ ์—…๋กœ๋“œ ์˜ต์…˜",visible=False)
1069
  chart_type = gr.Dropdown(["์ผ๋ฐ˜ ๊ฐ€๋กœ ๋ง‰๋Œ€ํ˜•","๋ˆ„์  ๊ฐ€๋กœ ๋ง‰๋Œ€ํ˜•","100% ๊ธฐ์ค€ ๋ˆ„์  ๊ฐ€๋กœ ๋ง‰๋Œ€ํ˜•", "์ผ๋ฐ˜ ์„ธ๋กœ ๋ง‰๋Œ€ํ˜•","๋ˆ„์  ์„ธ๋กœ ๋ง‰๋Œ€ํ˜•","100% ๊ธฐ์ค€ ๋ˆ„์  ์„ธ๋กœ ๋ง‰๋Œ€ํ˜•","์„ ํ˜•", "์›ํ˜•", "๊ธฐํƒ€ ๋ฐฉ์‚ฌํ˜•", "๊ธฐํƒ€ ํ˜ผํ•ฉํ˜•", "์ „์ฒด"], label="Chart Type", value="all")
1070
+ model_type=gr.Dropdown(["VAIV_DePlot","VAIV_UniChart","all"],label="model",multiselect=True)
1071
  image_displayer=gr.Image(visible=True)
1072
  with gr.Row():
1073
  pre_button=gr.Button("์ด์ „",interactive="False")
 
1077
  #file_button.click(interface_selector, inputs=gr.State("ํŒŒ์ผ ์—…๋กœ๋“œ"), outputs=[image_uploader, file_uploader,mode,mode_label,image_name])
1078
  inference_button=gr.Button("์ถ”๋ก ")
1079
  with gr.Column():
1080
+ ko_deplot_generated_table=gr.DataFrame(visible=False,label="VAIV_DePlot ์ถ”๋ก  ๊ฒฐ๊ณผ",elem_classes="dataframe-class")
1081
  aihub_deplot_generated_table=gr.DataFrame(visible=False,label="aihub-deplot ์ถ”๋ก  ๊ฒฐ๊ณผ",elem_classes="dataframe-class")
1082
+ unichart_generated_table=gr.DataFrame(visible=False,label="VAIV_UniChart ์ถ”๋ก  ๊ฒฐ๊ณผ",elem_classes="dataframe-class")
1083
  with gr.Column():
1084
+ ko_deplot_label_table=gr.DataFrame(visible=False,label="VAIV_DePlot ์ •๋‹ตํ…Œ์ด๋ธ”",elem_classes="dataframe-class")
1085
  aihub_deplot_label_table=gr.DataFrame(visible=False,label="aihub-deplot ์ •๋‹ตํ…Œ์ด๋ธ”",elem_classes="dataframe-class")
1086
+ unichart_label_table=gr.DataFrame(visible=False,label="VAIV_UniChart ์ •๋‹ตํ…Œ์ด๋ธ”",elem_classes="dataframe-class")
1087
  with gr.Column():
1088
+ ko_deplot_score_table=gr.DataFrame(visible=False,label="VAIV_DePlot ์ ์ˆ˜",elem_classes="dataframe-class")
1089
  aihub_deplot_score_table=gr.DataFrame(visible=False,label="aihub_deplot ์ ์ˆ˜",elem_classes="dataframe-class")
1090
+ unichart_score_table=gr.DataFrame(visible=False,label="VAIV_UniChart ์ ์ˆ˜",elem_classes="dataframe-class")
1091
  model_type.change(
1092
  update_results,
1093
  inputs=[model_type],