Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import cairosvg
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
def show(url):
|
| 5 |
+
cairosvg.svg2png(url=url, write_to=f"./test.png")
|
| 6 |
+
|
| 7 |
+
with gr.Blocks() as bl:
|
| 8 |
+
img = gr.Image(type='pil')
|
| 9 |
+
img.upload(fn=show, inputs=img)
|
| 10 |
+
|
| 11 |
+
bl.launch()
|