浏览代码

Merge pull request #2932 from opendatalab/dev

docs: add option to consult online AI assistant in bug report template
Xiaomeng Zhao 4 月之前
父节点
当前提交
2af1dc1744
共有 2 个文件被更改,包括 20 次插入8 次删除
  1. 9 0
      .github/ISSUE_TEMPLATE/bug_report.yml
  2. 11 8
      mineru/model/table/rapid_table.py

+ 9 - 0
.github/ISSUE_TEMPLATE/bug_report.yml

@@ -24,6 +24,15 @@ body:
         - label: I have searched the MinerU [Discussions](https://github.com/opendatalab/MinerU/discussions) and found no similar bug report.
           required: true
 
+  - type: checkboxes
+    attributes:
+      label: 🤖 Consult the online AI assistant for assistance | 在线 AI 助手咨询
+      description: >
+        This [online AI assistant](https://deepwiki.com/opendatalab/MinerU) is specifically trained to help with MinerU and related topics! It's available 24/7 and ready to provide insights.
+      options:
+        - label: I have consulted the [online AI assistant](https://deepwiki.com/opendatalab/MinerU) but was unable to obtain a solution to the issue.
+          required: true
+
   - type: textarea
     id: description
     attributes:

+ 11 - 8
mineru/model/table/rapid_table.py

@@ -76,11 +76,14 @@ class RapidTableModel(object):
 
 
         if ocr_result:
-            table_results = self.table_model(np.asarray(image), ocr_result)
-            html_code = table_results.pred_html
-            table_cell_bboxes = table_results.cell_bboxes
-            logic_points = table_results.logic_points
-            elapse = table_results.elapse
-            return html_code, table_cell_bboxes, logic_points, elapse
-        else:
-            return None, None, None, None
+            try:
+                table_results = self.table_model(np.asarray(image), ocr_result)
+                html_code = table_results.pred_html
+                table_cell_bboxes = table_results.cell_bboxes
+                logic_points = table_results.logic_points
+                elapse = table_results.elapse
+                return html_code, table_cell_bboxes, logic_points, elapse
+            except Exception as e:
+                logger.exception(e)
+
+        return None, None, None, None