Spaces:
Runtime error
Runtime error
File size: 3,436 Bytes
1bd70cc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
def get_css(kwargs) -> str:
if kwargs['h2ocolors']:
css_code = """footer {visibility: hidden;}
body{background:linear-gradient(#f5f5f5,#e5e5e5);}
body.dark{background:linear-gradient(#000000,#0d0d0d);}
"""
else:
css_code = """footer {visibility: hidden}"""
css_code += make_css_base()
return css_code
def make_css_base() -> str:
return """
#col_container {margin-left: auto; margin-right: auto; text-align: left;}
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap');
body.dark{#warning {background-color: #555555};}
#sidebar {
order: 1;
@media (max-width: 463px) {
order: 2;
}
}
#col-tabs {
order: 2;
@media (max-width: 463px) {
order: 1;
}
}
#small_btn {
margin: 0.6em 0em 0.55em 0;
max-width: 20em;
min-width: 5em !important;
height: 5em;
font-size: 14px !important;
}
#prompt-form {
border: 1px solid var(--primary-500) !important;
}
#prompt-form.block {
border-radius: var(--block-radius) !important;
}
#prompt-form textarea {
border: 1px solid rgb(209, 213, 219);
}
#prompt-form label > div {
margin-top: 4px;
}
button.primary:hover {
background-color: var(--primary-600) !important;
transition: .2s;
}
#prompt-form-area {
margin-bottom: 2.5rem;
}
.chatsmall chatbot {font-size: 10px !important}
.gradio-container {
max-width: none !important;
}
div.message {
padding: var(--text-lg) !important;
}
div.message.user > div.icon-button {
top: unset;
bottom: 0;
}
div.message.bot > div.icon-button {
top: unset;
bottom: 0;
}
#prompt-form-row {
position: relative;
}
#attach-button {
position: absolute;
top: 45px;
right: 20px;
display: flex;
justify-content: center;
border: 1px solid var(--primary-500) !important;
@media (max-width: 463px) {
width: 56px;
}
}
#attach-button > img {
margin-right: 0;
}
#prompt-form > label > textarea {
padding-right: 104px;
@media (max-width: 463px) {
min-height: 94px;
padding-right: 70px;
}
}
#visible-models > label > div.wrap > div.wrap-inner > div.secondary-wrap > div.remove-all {
display: none !important;
}
#visible-models > label > div.wrap > div.wrap-inner > div.token {
display: none !important;
}
#visible-models > label > div.wrap > div.wrap-inner > div.secondary-wrap::before {
content: "Select";
padding: 0 4px;
margin-right: 2px;
}
#langchain_agents > label > div.wrap > div.wrap-inner > div.secondary-wrap > div.remove-all {
display: none !important;
}
#langchain_agents > label > div.wrap > div.wrap-inner > div.token {
display: none !important;
}
#langchain_agents > label > div.wrap > div.wrap-inner > div.secondary-wrap::before {
content: "Select";
padding: 0 4px;
margin-right: 2px;
}
"""
|