Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,4 +10,51 @@ pinned: false
|
|
| 10 |
license: apache-2.0
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
license: apache-2.0
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Markdown to PDF Converter
|
| 14 |
+
|
| 15 |
+
This is a Gradio app that converts Markdown files to PDF format with preview functionality. The app is deployed on Hugging Face Spaces.
|
| 16 |
+
|
| 17 |
+
## Features
|
| 18 |
+
|
| 19 |
+
- Upload Markdown files
|
| 20 |
+
- Preview the converted content
|
| 21 |
+
- Download the generated PDF
|
| 22 |
+
- Responsive design
|
| 23 |
+
- Support for basic Markdown syntax
|
| 24 |
+
|
| 25 |
+
## Local Development
|
| 26 |
+
|
| 27 |
+
1. Clone the repository
|
| 28 |
+
2. Install the requirements:
|
| 29 |
+
```bash
|
| 30 |
+
pip install -r requirements.txt
|
| 31 |
+
```
|
| 32 |
+
3. Run the app:
|
| 33 |
+
```bash
|
| 34 |
+
python app.py
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
## Deployment on Hugging Face Spaces
|
| 38 |
+
|
| 39 |
+
1. Create a new Space on Hugging Face
|
| 40 |
+
2. Choose "Gradio" as the SDK
|
| 41 |
+
3. Upload these files to your Space:
|
| 42 |
+
- app.py
|
| 43 |
+
- requirements.txt
|
| 44 |
+
- README.md
|
| 45 |
+
|
| 46 |
+
The app will automatically deploy and be available at your Space's URL.
|
| 47 |
+
|
| 48 |
+
## Dependencies
|
| 49 |
+
|
| 50 |
+
- gradio: For the web interface
|
| 51 |
+
- markdown: For converting Markdown to HTML
|
| 52 |
+
- pdfkit: For converting HTML to PDF
|
| 53 |
+
- wkhtmltopdf-pack: Required by pdfkit for PDF conversion
|
| 54 |
+
|
| 55 |
+
## Usage
|
| 56 |
+
|
| 57 |
+
1. Open the app in your browser
|
| 58 |
+
2. Click "Upload Markdown File" and select your .md file
|
| 59 |
+
3. Wait for the preview to appear
|
| 60 |
+
4. Click "Download PDF" to get your converted file
|