Sangjun2 commited on
Commit
1dc7bb7
·
verified ·
1 Parent(s): 0a1c8a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -11
app.py CHANGED
@@ -639,7 +639,7 @@ class Highlighter:
639
 
640
  # 1. 데이터 로드
641
  aihub_deplot_result_df = pd.read_csv('./aihub_deplot_result.csv')
642
- ko_deplot_result= './ko-deplot-base-pred-epoch1-refinetuning.json'
643
  unichart_result='./unichart_results.json'
644
 
645
  # 2. 체크해야 하는 이미지 파일 로드
@@ -1018,7 +1018,10 @@ def handle_chart_type_change(chart_type,all_file_path):
1018
  return image,image_names[current_index]
1019
 
1020
  css = """
1021
- #warning span {font-size: 24px !important}
 
 
 
1022
  """
1023
 
1024
  with gr.Blocks(css=css) as iface:
@@ -1047,17 +1050,17 @@ with gr.Blocks(css=css) as iface:
1047
  #file_button.click(interface_selector, inputs=gr.State("파일 업로드"), outputs=[image_uploader, file_uploader,mode,mode_label,image_name])
1048
  inference_button=gr.Button("추론")
1049
  with gr.Column():
1050
- ko_deplot_generated_table=gr.DataFrame(visible=False,label="ko-deplot 추론 결과",elem_id="warning")
1051
- aihub_deplot_generated_table=gr.DataFrame(visible=False,label="aihub-deplot 추론 결과",elem_id="warning")
1052
- unichart_generated_table=gr.DataFrame(visible=False,label="unichart 추론 결과",elem_id="warning")
1053
  with gr.Column():
1054
- ko_deplot_label_table=gr.DataFrame(visible=False,label="ko-deplot 정답테이블",elem_id="warning")
1055
- aihub_deplot_label_table=gr.DataFrame(visible=False,label="aihub-deplot 정답테이블",elem_id="warning")
1056
- unichart_label_table=gr.DataFrame(visible=False,label="unichart 정답테이블",elem_id="warning")
1057
  with gr.Column():
1058
- ko_deplot_score_table=gr.DataFrame(visible=False,label="ko_deplot 점수",elem_id="warning")
1059
- aihub_deplot_score_table=gr.DataFrame(visible=False,label="aihub_deplot 점수",elem_id="warning")
1060
- unichart_score_table=gr.DataFrame(visible=False,label="unichart 점수",elem_id="warning")
1061
  model_type.change(
1062
  update_results,
1063
  inputs=[model_type],
 
639
 
640
  # 1. 데이터 로드
641
  aihub_deplot_result_df = pd.read_csv('./aihub_deplot_result.csv')
642
+ ko_deplot_result= './ko-deplot-base-pred-epoch3-refinetuning.json'
643
  unichart_result='./unichart_results.json'
644
 
645
  # 2. 체크해야 하는 이미지 파일 로드
 
1018
  return image,image_names[current_index]
1019
 
1020
  css = """
1021
+ .dataframe-class {
1022
+ height: 300px; /* 높이를 고정 */
1023
+ overflow-y: auto !important; /* 스크롤을 가능하게 */
1024
+ }
1025
  """
1026
 
1027
  with gr.Blocks(css=css) as iface:
 
1050
  #file_button.click(interface_selector, inputs=gr.State("파일 업로드"), outputs=[image_uploader, file_uploader,mode,mode_label,image_name])
1051
  inference_button=gr.Button("추론")
1052
  with gr.Column():
1053
+ ko_deplot_generated_table=gr.DataFrame(visible=False,label="ko-deplot 추론 결과",elem_classes="dataframe-class")
1054
+ aihub_deplot_generated_table=gr.DataFrame(visible=False,label="aihub-deplot 추론 결과",elem_classes="dataframe-class")
1055
+ unichart_generated_table=gr.DataFrame(visible=False,label="unichart 추론 결과",elem_classes="dataframe-class")
1056
  with gr.Column():
1057
+ ko_deplot_label_table=gr.DataFrame(visible=False,label="ko-deplot 정답테이블",elem_classes="dataframe-class")
1058
+ aihub_deplot_label_table=gr.DataFrame(visible=False,label="aihub-deplot 정답테이블",elem_classes="dataframe-class")
1059
+ unichart_label_table=gr.DataFrame(visible=False,label="unichart 정답테이블",elem_classes="dataframe-class")
1060
  with gr.Column():
1061
+ ko_deplot_score_table=gr.DataFrame(visible=False,label="ko_deplot 점수",elem_classes="dataframe-class")
1062
+ aihub_deplot_score_table=gr.DataFrame(visible=False,label="aihub_deplot 점수",elem_classes="dataframe-class")
1063
+ unichart_score_table=gr.DataFrame(visible=False,label="unichart 점수",elem_classes="dataframe-class")
1064
  model_type.change(
1065
  update_results,
1066
  inputs=[model_type],