Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -379,8 +379,11 @@ def convert_markdown_marp(markdown, output_format='html'):
|
|
| 379 |
async def create_presentation(data: PresentationModel):
|
| 380 |
if not data.markdown:
|
| 381 |
raise HTTPException(status_code=400, detail="Please provide Markdown text.")
|
| 382 |
-
|
| 383 |
-
|
|
|
|
|
|
|
|
|
|
| 384 |
result = convert_markdown_marp(markdown_with_images, output_format)
|
| 385 |
|
| 386 |
if result:
|
|
|
|
| 379 |
async def create_presentation(data: PresentationModel):
|
| 380 |
if not data.markdown:
|
| 381 |
raise HTTPException(status_code=400, detail="Please provide Markdown text.")
|
| 382 |
+
|
| 383 |
+
markdown = data.markdown
|
| 384 |
+
output_format = data.output_format
|
| 385 |
+
|
| 386 |
+
markdown_with_images = replace_image_keywords(extract_data_from_tag(markdown, "marp_presentation"))
|
| 387 |
result = convert_markdown_marp(markdown_with_images, output_format)
|
| 388 |
|
| 389 |
if result:
|