Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,11 +17,12 @@ driver_type = 'chromedriver'
|
|
17 |
driver=False
|
18 |
|
19 |
|
20 |
-
def html2im():
|
21 |
|
22 |
-
html =
|
23 |
-
css =
|
24 |
-
hti.screenshot(html_str=html,
|
|
|
25 |
return 'red_page.png'
|
26 |
|
27 |
def get_concat_h_cut(in1, in2):
|
@@ -127,6 +128,6 @@ with gr.Blocks() as app:
|
|
127 |
out=gr.Image()
|
128 |
outgal=gr.Gallery()
|
129 |
outim = gr.Image()
|
130 |
-
btn.click(html2im,
|
131 |
#btn.click(run_script,[inp,height,width,check_b,check_h],[outim,message,outgal,out])
|
132 |
app.queue(default_concurrency_limit=5).launch()
|
|
|
17 |
driver=False
|
18 |
|
19 |
|
20 |
+
def html2im(html,css=None):
|
21 |
|
22 |
+
html = html
|
23 |
+
#css = css
|
24 |
+
hti.screenshot(html_str=html, save_as='red_page.png')
|
25 |
+
#hti.screenshot(html_str=html, css_str=css, save_as='red_page.png')
|
26 |
return 'red_page.png'
|
27 |
|
28 |
def get_concat_h_cut(in1, in2):
|
|
|
128 |
out=gr.Image()
|
129 |
outgal=gr.Gallery()
|
130 |
outim = gr.Image()
|
131 |
+
btn.click(html2im,inp,out)
|
132 |
#btn.click(run_script,[inp,height,width,check_b,check_h],[outim,message,outgal,out])
|
133 |
app.queue(default_concurrency_limit=5).launch()
|