Remove _is_chart
This commit is contained in:
@@ -586,7 +586,6 @@ class PptxConverter(HtmlConverter):
|
|||||||
if shape.has_chart:
|
if shape.has_chart:
|
||||||
md_content += self._convert_chart_to_markdown(shape.chart)
|
md_content += self._convert_chart_to_markdown(shape.chart)
|
||||||
|
|
||||||
|
|
||||||
# Text areas
|
# Text areas
|
||||||
elif shape.has_text_frame:
|
elif shape.has_text_frame:
|
||||||
if shape == title:
|
if shape == title:
|
||||||
@@ -621,11 +620,6 @@ class PptxConverter(HtmlConverter):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def _is_chart(self, shape):
|
|
||||||
if shape.shape_type == pptx.enum.shapes.MSO_SHAPE_TYPE.CHART:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def _convert_chart_to_markdown(self, chart):
|
def _convert_chart_to_markdown(self, chart):
|
||||||
md = "\n\n### Chart"
|
md = "\n\n### Chart"
|
||||||
if chart.has_title:
|
if chart.has_title:
|
||||||
@@ -649,6 +643,7 @@ class PptxConverter(HtmlConverter):
|
|||||||
separator = "|" + "|".join(["---"] * len(data[0])) + "|"
|
separator = "|" + "|".join(["---"] * len(data[0])) + "|"
|
||||||
return md + "\n".join([header, separator] + markdown_table[1:])
|
return md + "\n".join([header, separator] + markdown_table[1:])
|
||||||
|
|
||||||
|
|
||||||
class MediaConverter(DocumentConverter):
|
class MediaConverter(DocumentConverter):
|
||||||
"""
|
"""
|
||||||
Abstract class for multi-modal media (e.g., images and audio)
|
Abstract class for multi-modal media (e.g., images and audio)
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ PPTX_TEST_STRINGS = [
|
|||||||
"44bf7d06-5e7a-4a40-a2e1-a2e42ef28c8a",
|
"44bf7d06-5e7a-4a40-a2e1-a2e42ef28c8a",
|
||||||
"1b92870d-e3b5-4e65-8153-919f4ff45592",
|
"1b92870d-e3b5-4e65-8153-919f4ff45592",
|
||||||
"AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation",
|
"AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation",
|
||||||
"a3f6004b-6f4f-4ea8-bee3-3741f4dc385f", # chart title
|
"a3f6004b-6f4f-4ea8-bee3-3741f4dc385f", # chart title
|
||||||
"2003", # chart value
|
"2003", # chart value
|
||||||
]
|
]
|
||||||
|
|
||||||
BLOG_TEST_URL = "https://microsoft.github.io/autogen/blog/2023/04/21/LLM-tuning-math"
|
BLOG_TEST_URL = "https://microsoft.github.io/autogen/blog/2023/04/21/LLM-tuning-math"
|
||||||
|
|||||||
Reference in New Issue
Block a user