Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ css="""
|
|
28 |
}
|
29 |
.chat_card{
|
30 |
background: #253251; #background_c
|
31 |
-
color:#
|
32 |
border-radius: 15px;
|
33 |
border-width: thin;
|
34 |
padding: 15px;
|
@@ -71,7 +71,7 @@ def make_filename(inp):
|
|
71 |
def get_screenshot(chat,css_in,w,h,user_c,bot_c,background_c,font_c):
|
72 |
print(user_c)
|
73 |
if user_c:
|
74 |
-
html_user=css.replace("background: #367bb9; #user_c",f"background: {user_c};")
|
75 |
html_body=""
|
76 |
for user,bot in chat:
|
77 |
html_body += html_user.replace("$chat",user)
|
@@ -149,7 +149,7 @@ with gr.Blocks(css=css) as app:
|
|
149 |
bot_c=gr.ColorPicker(value="#1c3c9b")
|
150 |
with gr.Row():
|
151 |
background_c=gr.ColorPicker(value="#253251")
|
152 |
-
font_c=gr.ColorPicker(value="#
|
153 |
chatblock=gr.Dropdown(label="Chatblocks",choices=[c for c in range(1,40)],multiselect=True)
|
154 |
|
155 |
im_btn=gr.Button("Screenshot")
|
|
|
28 |
}
|
29 |
.chat_card{
|
30 |
background: #253251; #background_c
|
31 |
+
color:#FFFFFF; #font_c
|
32 |
border-radius: 15px;
|
33 |
border-width: thin;
|
34 |
padding: 15px;
|
|
|
71 |
def get_screenshot(chat,css_in,w,h,user_c,bot_c,background_c,font_c):
|
72 |
print(user_c)
|
73 |
if user_c:
|
74 |
+
html_user=css.replace("background: #367bb9; #user_c",f"background: {user_c.strip('""')};")
|
75 |
html_body=""
|
76 |
for user,bot in chat:
|
77 |
html_body += html_user.replace("$chat",user)
|
|
|
149 |
bot_c=gr.ColorPicker(value="#1c3c9b")
|
150 |
with gr.Row():
|
151 |
background_c=gr.ColorPicker(value="#253251")
|
152 |
+
font_c=gr.ColorPicker(value="#FFFFFF")
|
153 |
chatblock=gr.Dropdown(label="Chatblocks",choices=[c for c in range(1,40)],multiselect=True)
|
154 |
|
155 |
im_btn=gr.Button("Screenshot")
|