File size: 1,292 Bytes
3be8d63
 
 
 
 
 
 
 
 
 
 
 
57c4998
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
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:
   ```bash
   pip install -r requirements.txt
   ```
3. Run the app:
   ```bash
   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