File size: 329 Bytes
dd1cb9c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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(
    fn=convert,
    inputs=[
        gr.File(label="Upload File", type="filepath"),
    ],
    outputs=[gr.Text(label="Markdown")],
).launch()