Update app.py
Browse files
app.py
CHANGED
|
@@ -46,45 +46,63 @@ document.addEventListener("DOMContentLoaded", ()=>{
|
|
| 46 |
"""
|
| 47 |
|
| 48 |
with gr.Blocks(css="""
|
| 49 |
-
body{
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
| 51 |
border-radius:30px;
|
| 52 |
-
padding:
|
| 53 |
max-width:700px;
|
| 54 |
-
margin:
|
| 55 |
-
background-color:#
|
| 56 |
-
box-shadow:0
|
| 57 |
}
|
| 58 |
-
.chat-message{
|
| 59 |
border-radius:25px;
|
| 60 |
padding:14px 18px;
|
| 61 |
margin:8px 0;
|
| 62 |
display:flex;
|
| 63 |
flex-direction:column;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
}
|
| 65 |
-
|
| 66 |
-
.chat-message.bot{background-color:#f0f0f0; align-items:flex-start;}
|
| 67 |
-
textarea{
|
| 68 |
border:none;
|
| 69 |
outline:none;
|
| 70 |
border-radius:20px;
|
| 71 |
-
padding:
|
| 72 |
-
background-color:#
|
| 73 |
-
color:#
|
| 74 |
-
font-size:16px;
|
|
|
|
|
|
|
| 75 |
}
|
| 76 |
-
button{
|
| 77 |
border:none;
|
| 78 |
border-radius:20px;
|
| 79 |
-
background-color:#
|
| 80 |
color:#fff;
|
| 81 |
-
padding:
|
| 82 |
font-size:16px;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
}
|
| 84 |
""") as demo:
|
| 85 |
with gr.Sidebar():
|
| 86 |
gr.LoginButton()
|
| 87 |
-
|
| 88 |
chatbot.render()
|
| 89 |
gr.HTML(fade_js)
|
| 90 |
|
|
|
|
| 46 |
"""
|
| 47 |
|
| 48 |
with gr.Blocks(css="""
|
| 49 |
+
body {
|
| 50 |
+
background-color:#000;
|
| 51 |
+
font-family:'Arial',sans-serif;
|
| 52 |
+
}
|
| 53 |
+
.gradio-container {
|
| 54 |
border-radius:30px;
|
| 55 |
+
padding:20px;
|
| 56 |
max-width:700px;
|
| 57 |
+
margin:30px auto;
|
| 58 |
+
background-color:#121212;
|
| 59 |
+
box-shadow:0 6px 25px rgba(0,0,0,0.3);
|
| 60 |
}
|
| 61 |
+
.chat-message {
|
| 62 |
border-radius:25px;
|
| 63 |
padding:14px 18px;
|
| 64 |
margin:8px 0;
|
| 65 |
display:flex;
|
| 66 |
flex-direction:column;
|
| 67 |
+
opacity:0;
|
| 68 |
+
}
|
| 69 |
+
.chat-message.user {
|
| 70 |
+
background-color:#1f1f1f;
|
| 71 |
+
color:#fff;
|
| 72 |
+
align-items:flex-end;
|
| 73 |
+
}
|
| 74 |
+
.chat-message.bot {
|
| 75 |
+
background-color:#2b2b2b;
|
| 76 |
+
color:#fff;
|
| 77 |
+
align-items:flex-start;
|
| 78 |
}
|
| 79 |
+
textarea {
|
|
|
|
|
|
|
| 80 |
border:none;
|
| 81 |
outline:none;
|
| 82 |
border-radius:20px;
|
| 83 |
+
padding:12px;
|
| 84 |
+
background-color:#1a1a1a;
|
| 85 |
+
color:#fff;
|
| 86 |
+
font-size:16px;
|
| 87 |
+
width:100%;
|
| 88 |
+
box-sizing:border-box;
|
| 89 |
}
|
| 90 |
+
button {
|
| 91 |
border:none;
|
| 92 |
border-radius:20px;
|
| 93 |
+
background-color:#444;
|
| 94 |
color:#fff;
|
| 95 |
+
padding:10px 18px;
|
| 96 |
font-size:16px;
|
| 97 |
+
cursor:pointer;
|
| 98 |
+
}
|
| 99 |
+
button:hover {
|
| 100 |
+
background-color:#555;
|
| 101 |
}
|
| 102 |
""") as demo:
|
| 103 |
with gr.Sidebar():
|
| 104 |
gr.LoginButton()
|
| 105 |
+
|
| 106 |
chatbot.render()
|
| 107 |
gr.HTML(fade_js)
|
| 108 |
|