Spaces:
Runtime error
Runtime error
Commit ·
57e5629
1
Parent(s): 443a067
endpoint issues
Browse files
app/DocumentGeneration/pdf_generator.py
CHANGED
|
@@ -26,7 +26,7 @@ from markdown_renderer import (
|
|
| 26 |
)
|
| 27 |
|
| 28 |
# Add Currency Mapping path
|
| 29 |
-
currency_mapping_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), '
|
| 30 |
if currency_mapping_path not in sys.path:
|
| 31 |
sys.path.append(currency_mapping_path)
|
| 32 |
from CurrencyMapping.currency_mapping import convert_currency_symbols_to_iso
|
|
|
|
| 26 |
)
|
| 27 |
|
| 28 |
# Add Currency Mapping path
|
| 29 |
+
currency_mapping_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'CurrencyMapping')
|
| 30 |
if currency_mapping_path not in sys.path:
|
| 31 |
sys.path.append(currency_mapping_path)
|
| 32 |
from CurrencyMapping.currency_mapping import convert_currency_symbols_to_iso
|
app/DocumentGeneration/word_generator.py
CHANGED
|
@@ -22,13 +22,17 @@ from document_helpers import (
|
|
| 22 |
from chart_generator import parse_embedded_chart_data, create_chart_from_data
|
| 23 |
from markdown_renderer import (
|
| 24 |
render_markdown_to_docx_grouped,
|
| 25 |
-
process_content_with_inline_charts
|
|
|
|
| 26 |
)
|
| 27 |
|
| 28 |
# Add Currency Mapping path
|
| 29 |
-
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__)), '
|
| 30 |
from CurrencyMapping.currency_mapping import convert_currency_symbols_to_iso
|
| 31 |
|
|
|
|
|
|
|
|
|
|
| 32 |
def create_word_document(request: ExportRequest):
|
| 33 |
"""Create a Word document from the business plan data with front page, TOC, and proper page breaks"""
|
| 34 |
try:
|
|
|
|
| 22 |
from chart_generator import parse_embedded_chart_data, create_chart_from_data
|
| 23 |
from markdown_renderer import (
|
| 24 |
render_markdown_to_docx_grouped,
|
| 25 |
+
process_content_with_inline_charts,
|
| 26 |
+
clean_text_for_pdf
|
| 27 |
)
|
| 28 |
|
| 29 |
# Add Currency Mapping path
|
| 30 |
+
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'CurrencyMapping'))
|
| 31 |
from CurrencyMapping.currency_mapping import convert_currency_symbols_to_iso
|
| 32 |
|
| 33 |
+
# Import sort_sections_by_order from utils module
|
| 34 |
+
from utils import sort_sections_by_order
|
| 35 |
+
|
| 36 |
def create_word_document(request: ExportRequest):
|
| 37 |
"""Create a Word document from the business plan data with front page, TOC, and proper page breaks"""
|
| 38 |
try:
|