|
@@ -20,7 +20,7 @@ from .analysis_controls import create_analysis_section
|
|
|
|
|
|
|
|
|
|
|
|
|
def setup_new_annotation_mode(
|
|
def setup_new_annotation_mode(
|
|
|
- ocr_data: list,
|
|
|
|
|
|
|
+ ocr_data: Dict,
|
|
|
image: Image.Image,
|
|
image: Image.Image,
|
|
|
display_config: Dict
|
|
display_config: Dict
|
|
|
) -> Tuple:
|
|
) -> Tuple:
|
|
@@ -31,7 +31,7 @@ def setup_new_annotation_mode(
|
|
|
(generator, structure, undo_stack, line_width, display_mode, zoom_level, show_line_numbers)
|
|
(generator, structure, undo_stack, line_width, display_mode, zoom_level, show_line_numbers)
|
|
|
"""
|
|
"""
|
|
|
# 🔑 获取当前工具类型
|
|
# 🔑 获取当前工具类型
|
|
|
- tool = st.session_state.get('current_tool', 'ppstructv3')
|
|
|
|
|
|
|
+ json_format = st.session_state.get('current_json_format', 'ppstructure')
|
|
|
|
|
|
|
|
# 初始化生成器
|
|
# 初始化生成器
|
|
|
if 'generator' not in st.session_state:
|
|
if 'generator' not in st.session_state:
|
|
@@ -53,7 +53,7 @@ def setup_new_annotation_mode(
|
|
|
# 分析控件
|
|
# 分析控件
|
|
|
structure = create_analysis_section(
|
|
structure = create_analysis_section(
|
|
|
st.session_state.generator,
|
|
st.session_state.generator,
|
|
|
- tool=tool # 🔑 传入工具类型
|
|
|
|
|
|
|
+ json_format=json_format # 🔑 传入数据格式类型
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
# 显示控件
|
|
# 显示控件
|