Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
|
| 7 |
|
| 8 |
css="""
|
| 9 |
.user_chat{
|
| 10 |
-
background: #367bb9;
|
| 11 |
border-radius: 10px 10px 0px 10px;
|
| 12 |
padding: 10px;
|
| 13 |
max-width: 100%;
|
|
@@ -17,7 +17,7 @@ css="""
|
|
| 17 |
|
| 18 |
}
|
| 19 |
.bot_chat{
|
| 20 |
-
background: #1c3c9b;
|
| 21 |
border-radius: 10px 10px 10px 0px;
|
| 22 |
padding: 10px;
|
| 23 |
max-width: 100%;
|
|
@@ -27,8 +27,8 @@ css="""
|
|
| 27 |
|
| 28 |
}
|
| 29 |
.chat_card{
|
| 30 |
-
background: #253251;
|
| 31 |
-
color:#ffffff;
|
| 32 |
border-radius: 15px;
|
| 33 |
border-width: thin;
|
| 34 |
padding: 15px;
|
|
@@ -70,7 +70,7 @@ def make_filename(inp):
|
|
| 70 |
|
| 71 |
def get_screenshot(chat,css_in,w,h,user_c,bot_c,background_c,font_c):
|
| 72 |
if user_c:
|
| 73 |
-
html_user=
|
| 74 |
html_body=""
|
| 75 |
for user,bot in chat:
|
| 76 |
html_body += html_user.replace("$chat",user)
|
|
|
|
| 7 |
|
| 8 |
css="""
|
| 9 |
.user_chat{
|
| 10 |
+
background: #367bb9; #user_c
|
| 11 |
border-radius: 10px 10px 0px 10px;
|
| 12 |
padding: 10px;
|
| 13 |
max-width: 100%;
|
|
|
|
| 17 |
|
| 18 |
}
|
| 19 |
.bot_chat{
|
| 20 |
+
background: #1c3c9b; #bot_c
|
| 21 |
border-radius: 10px 10px 10px 0px;
|
| 22 |
padding: 10px;
|
| 23 |
max-width: 100%;
|
|
|
|
| 27 |
|
| 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;
|
|
|
|
| 70 |
|
| 71 |
def get_screenshot(chat,css_in,w,h,user_c,bot_c,background_c,font_c):
|
| 72 |
if user_c:
|
| 73 |
+
html_user=css.replace("background: #367bb9; #user_c",f"background: {user_c};")
|
| 74 |
html_body=""
|
| 75 |
for user,bot in chat:
|
| 76 |
html_body += html_user.replace("$chat",user)
|