Spaces:
Running
Running
user commited on
Commit ·
2b54feb
1
Parent(s): 4ad7e37
Add usage instructions
Browse files10 unmodified lines1112131415161710 unmodified lines2829303132333410 unmodified linestemplate_path = template_file.namecommand += f" --reference-doc={template_path}"subprocess.run(command, shell=True, check=True)return output_path10 unmodified linesoutputs="file",examples=examples,title="Markdown to PPT Converter",description="上傳一個 Markdown 檔案,並選擇性地上傳 PPT 模板,將其轉換為 PPT 格式並下載。 Upload a Markdown file, and optionally upload a PPT template to convert it into PPT format and download.")# 啟動介面10 unmodified lines11121314151617181920212210 unmodified lines33343536373839404142434445464748495051525354555610 unmodified linestemplate_path = template_file.namecommand += f" --reference-doc={template_path}"try:subprocess.run(command, shell=True, check=True)except subprocess.CalledProcessError as e:return f"Error: Conversion failed. Details: {e}"except Exception as e:return f"Unexpected error occurred: {e}"return output_path10 unmodified linesoutputs="file",examples=examples,title="Markdown to PPT Converter",description="上傳一個 Markdown 檔案,並選擇性地上傳 PPT 模板,將其轉換為 PPT 格式並下載。 Upload a Markdown file, and optionally upload a PPT template to convert it into PPT format and download.",article="""### 使用步驟1. **上傳 Markdown 檔案**:點擊「Markdown File」欄位並選擇要轉換的 Markdown 文件。2. **選擇性上傳 PPT 模板**:如需指定模板,可點擊「PPT Template (Optional)」欄位上傳 PPT 模板檔案。否則將使用預設樣式轉換。3. **點擊提交**:點擊「Submit」按鈕進行轉換。4. **下載轉換結果**:轉換完成後,下載生成的 PPT 文件。---### Steps in English1. **Upload the Markdown file**: Click on the "Markdown File" field and select the Markdown file you want to convert.2. **Optionally upload a PPT template**: If you want to use a specific template, click on the "PPT Template (Optional)" field to upload a PPT template file. Otherwise, the default style will be used.3. **Click Submit**: Press the "Submit" button to start the conversion.4. **Download the result**: Once the conversion is complete, download the generated PPT file.<https://blog.toolman.xyz/article/306>""")# 啟動介面
main.py+24-2