Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -68,7 +68,7 @@ def make_filename(inp):
|
|
68 |
filename=first_name+str(last_name)
|
69 |
return filename
|
70 |
|
71 |
-
def get_screenshot(chat,block,css_in,w,h,user_c,bot_c,background_c,font_c):
|
72 |
chat_len=len(chat)
|
73 |
print(chat_len)
|
74 |
block_box=[]
|
@@ -164,12 +164,12 @@ with gr.Blocks(css=css) as app:
|
|
164 |
|
165 |
im_btn=gr.Button("Screenshot")
|
166 |
img=gr.Image(type='filepath')
|
167 |
-
html_view=gr.HTML()
|
168 |
btn.click(chat_inf,[sys_inp,inp,chat_b],chat_b)
|
169 |
-
im_btn.click(get_screenshot,[chat_b,chatblock,css_box,im_width,im_height,user_c,bot_c,background_c,font_c],[img
|
170 |
#im_btn.click(get_screenshot,[chat_b,im_height,im_width,chatblock,theme,wait_time],img)
|
171 |
#app.load(get_screenshot,inp,img)
|
172 |
-
app.launch()
|
173 |
|
174 |
|
175 |
|
|
|
68 |
filename=first_name+str(last_name)
|
69 |
return filename
|
70 |
|
71 |
+
def get_screenshot(chat,block=[],css_in=css,w=500,h=800,user_c="#367bb9",bot_c="#1c3c9b",background_c="#253251",font_c="#ffffff"):
|
72 |
chat_len=len(chat)
|
73 |
print(chat_len)
|
74 |
block_box=[]
|
|
|
164 |
|
165 |
im_btn=gr.Button("Screenshot")
|
166 |
img=gr.Image(type='filepath')
|
167 |
+
#html_view=gr.HTML()
|
168 |
btn.click(chat_inf,[sys_inp,inp,chat_b],chat_b)
|
169 |
+
im_btn.click(get_screenshot,[chat_b,chatblock,css_box,im_width,im_height,user_c,bot_c,background_c,font_c],[img])
|
170 |
#im_btn.click(get_screenshot,[chat_b,im_height,im_width,chatblock,theme,wait_time],img)
|
171 |
#app.load(get_screenshot,inp,img)
|
172 |
+
app.queue(default_concurrency_limit=10).launch()
|
173 |
|
174 |
|
175 |
|