markdownPDF / README.md
codelion's picture
Update README.md
57c4998 verified
|
raw
history blame
1.29 kB
metadata
title: MarkdownPDF
emoji: πŸ“ˆ
colorFrom: blue
colorTo: blue
sdk: gradio
sdk_version: 5.16.2
app_file: app.py
pinned: false
license: apache-2.0

Markdown to PDF Converter

This is a Gradio app that converts Markdown files to PDF format with preview functionality. The app is deployed on Hugging Face Spaces.

Features

  • Upload Markdown files
  • Preview the converted content
  • Download the generated PDF
  • Responsive design
  • Support for basic Markdown syntax

Local Development

  1. Clone the repository
  2. Install the requirements:
    pip install -r requirements.txt
    
  3. Run the app:
    python app.py
    

Deployment on Hugging Face Spaces

  1. Create a new Space on Hugging Face
  2. Choose "Gradio" as the SDK
  3. Upload these files to your Space:
    • app.py
    • requirements.txt
    • README.md

The app will automatically deploy and be available at your Space's URL.

Dependencies

  • gradio: For the web interface
  • markdown: For converting Markdown to HTML
  • pdfkit: For converting HTML to PDF
  • wkhtmltopdf-pack: Required by pdfkit for PDF conversion

Usage

  1. Open the app in your browser
  2. Click "Upload Markdown File" and select your .md file
  3. Wait for the preview to appear
  4. Click "Download PDF" to get your converted file