Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def get_screenshot(chat,css=None):
|
|
36 |
#hti.screenshot(html_str=html, save_as='red_page.png')
|
37 |
#hti.screenshot(html_str=html_card, css_str=css, save_as='red_page.png')
|
38 |
hti.screenshot(html_str=html, save_as='red_page.png')
|
39 |
-
return 'red_page.png'
|
40 |
|
41 |
|
42 |
def format_prompt(message, history):
|
@@ -105,8 +105,9 @@ with gr.Blocks() as app:
|
|
105 |
|
106 |
im_btn=gr.Button("Screenshot")
|
107 |
img=gr.Image(type='filepath')
|
|
|
108 |
btn.click(chat_inf,[sys_inp,inp,chat_b],chat_b)
|
109 |
-
im_btn.click(get_screenshot,[chat_b],img)
|
110 |
#im_btn.click(get_screenshot,[chat_b,im_height,im_width,chatblock,theme,wait_time],img)
|
111 |
#app.load(get_screenshot,inp,img)
|
112 |
app.launch()
|
|
|
36 |
#hti.screenshot(html_str=html, save_as='red_page.png')
|
37 |
#hti.screenshot(html_str=html_card, css_str=css, save_as='red_page.png')
|
38 |
hti.screenshot(html_str=html, save_as='red_page.png')
|
39 |
+
return 'red_page.png',html
|
40 |
|
41 |
|
42 |
def format_prompt(message, history):
|
|
|
105 |
|
106 |
im_btn=gr.Button("Screenshot")
|
107 |
img=gr.Image(type='filepath')
|
108 |
+
html_view=gr.HTML()
|
109 |
btn.click(chat_inf,[sys_inp,inp,chat_b],chat_b)
|
110 |
+
im_btn.click(get_screenshot,[chat_b],[img,html_view])
|
111 |
#im_btn.click(get_screenshot,[chat_b,im_height,im_width,chatblock,theme,wait_time],img)
|
112 |
#app.load(get_screenshot,inp,img)
|
113 |
app.launch()
|