File size: 307 Bytes
dd1cb9c
 
 
 
 
 
 
 
 
 
 
1cf5a2d
 
 
dd1cb9c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
import os


def convert(file):
    os.system(f"pandoc {file} -t markdown -o output.md")
    with open("output.md", "r") as f:
        return f.read()


gr.Interface(
    convert,
    inputs=gr.File(label="Upload File", type="filepath"),
    outputs=gr.Text(label="Markdown"),
).launch()