diff --git a/docs/en/notes/mm_guide/image_understanding/context_vqa.md b/docs/en/notes/mm_guide/image_understanding/context_vqa.md index 52bbe3b3..3084f9d6 100644 --- a/docs/en/notes/mm_guide/image_understanding/context_vqa.md +++ b/docs/en/notes/mm_guide/image_understanding/context_vqa.md @@ -30,28 +30,24 @@ The main flow includes: ```bash mkdir run_dataflow_mm cd run_dataflow_mm - ``` ### Step 2: Initialize DataFlow-MM ```bash -dataflow init - +dataflowmm init ``` You will now see: ```bash gpu_pipelines/context_vqa.py - ``` ### Step 3: Download Example Data ```bash huggingface-cli download --repo-type dataset OpenDCAI/dataflow-demo-image --local-dir example_data - ``` ### Step 4: Configure Model and Data Paths @@ -75,14 +71,12 @@ self.storage = FileStorage( file_name_prefix="context_vqa", cache_type="json", ) - ``` ### Step 5: One-Click Run ```bash python gpu_pipelines/context_vqa.py - ``` --- @@ -107,7 +101,6 @@ Input data is managed through `FileStorage`, supporting breakpoint resumption. ] } ] - ``` ### 2. **Core Operator Logic** @@ -125,7 +118,6 @@ self.vqa_generator.run( input_image_key=input_image_key, output_answer_key=output_answer_key, ) - ``` #### B. **WikiQARefiner (Result Parsing)** @@ -140,7 +132,6 @@ self.refiner.run( input_key="vqa", # Raw text from the previous step output_key="context_vqa" # Final structured data ) - ``` ### 3. **Output Data** @@ -163,7 +154,6 @@ The final structured data includes `context` (article) and `qas` (list of questi ] } } - ``` --- @@ -236,5 +226,4 @@ class ContextVQAPipeline: if __name__ == "__main__": pipe = ContextVQAPipeline() pipe.forward() - ``` \ No newline at end of file diff --git a/docs/zh/notes/mm_guide/image_understanding/context_vqa.md b/docs/zh/notes/mm_guide/image_understanding/context_vqa.md index cd9ac1da..542e77c8 100644 --- a/docs/zh/notes/mm_guide/image_understanding/context_vqa.md +++ b/docs/zh/notes/mm_guide/image_understanding/context_vqa.md @@ -30,28 +30,24 @@ permalink: /zh/mm_guide/contextvqa_pipeline/ ```bash mkdir run_dataflow_mm cd run_dataflow_mm - ``` ### 第二步:初始化 DataFlow-MM ```bash -dataflow init - +dataflowmm init ``` 这时你会看到: ```bash gpu_pipelines/context_vqa.py - ``` ### 第三步:下载示例数据 ```bash huggingface-cli download --repo-type dataset OpenDCAI/dataflow-demo-image --local-dir example_data - ``` ### 第四步:配置模型与数据路径 @@ -75,14 +71,12 @@ self.storage = FileStorage( file_name_prefix="context_vqa", cache_type="json", ) - ``` ### 第五步:一键运行 ```bash python gpu_pipelines/context_vqa.py - ``` --- @@ -107,7 +101,6 @@ python gpu_pipelines/context_vqa.py ] } ] - ``` ### 2. **核心算子逻辑** @@ -125,7 +118,6 @@ self.vqa_generator.run( input_image_key=input_image_key, output_answer_key=output_answer_key, ) - ``` #### B. **WikiQARefiner(结果解析)** @@ -140,7 +132,6 @@ self.refiner.run( input_key="vqa", # 输入上一涉的原始文本 output_key="context_vqa" # 输出最终结构化数据 ) - ``` ### 3. **输出数据** @@ -163,7 +154,6 @@ self.refiner.run( ] } } - ``` --- @@ -235,5 +225,4 @@ class ContextVQAPipeline: if __name__ == "__main__": pipe = ContextVQAPipeline() pipe.forward() - ``` \ No newline at end of file