Spaces:
Sleeping
Sleeping
martinsinnona
commited on
Commit
·
3c28bcd
1
Parent(s):
a1cce6c
app.py
CHANGED
@@ -34,7 +34,7 @@ def draw_vega(vega, scale=3):
|
|
34 |
spec = json.dumps(vega, indent=4)
|
35 |
png_data = vlc.vegalite_to_png(vl_spec=spec, scale=scale)
|
36 |
|
37 |
-
return Image.open(BytesIO(png_data))
|
38 |
|
39 |
def string_to_vega(string):
|
40 |
|
@@ -58,7 +58,7 @@ iface = gr.Interface(
|
|
58 |
inputs=gr.Image(type="pil"),
|
59 |
|
60 |
outputs=[gr.Textbox(),
|
61 |
-
gr.Image(type="pil", label="Generated Vega Image"
|
62 |
|
63 |
title="Image to Vega-Lite",
|
64 |
description="Upload an image to generate vega-lite"
|
|
|
34 |
spec = json.dumps(vega, indent=4)
|
35 |
png_data = vlc.vegalite_to_png(vl_spec=spec, scale=scale)
|
36 |
|
37 |
+
return Image.open(BytesIO(png_data))
|
38 |
|
39 |
def string_to_vega(string):
|
40 |
|
|
|
58 |
inputs=gr.Image(type="pil"),
|
59 |
|
60 |
outputs=[gr.Textbox(),
|
61 |
+
gr.Image(type="pil", label="Generated Vega Image")],
|
62 |
|
63 |
title="Image to Vega-Lite",
|
64 |
description="Upload an image to generate vega-lite"
|