Spaces:
Running
Running
Add a banner about model temperature settings
Browse files- app.py +8 -0
- styles.css +45 -4
app.py
CHANGED
|
@@ -516,6 +516,14 @@ with gr.Blocks(theme=theme, css=custom_css) as demo:
|
|
| 516 |
}}
|
| 517 |
</style>
|
| 518 |
""", elem_classes="css-styles")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 519 |
with gr.Row(variant="panel", elem_classes="responsive-row"):
|
| 520 |
with gr.Column(scale=1, min_width=400, elem_classes="model-dropdown-container"):
|
| 521 |
model_dropdown = gr.Dropdown(
|
|
|
|
| 516 |
}}
|
| 517 |
</style>
|
| 518 |
""", elem_classes="css-styles")
|
| 519 |
+
with gr.Row(variant="compact", elem_classes=["responsive-row", "no-padding"], ):
|
| 520 |
+
with gr.Column():
|
| 521 |
+
gr.Markdown(
|
| 522 |
+
"""
|
| 523 |
+
<span class="banner-message-text">ℹ️ This app has been updated to use the recommended temperature of 0.6. We had set it to 0.8 earlier and expect 0.6 to be better. Please provide feedback using the model link.</span>
|
| 524 |
+
"""
|
| 525 |
+
, elem_classes="banner-message"
|
| 526 |
+
)
|
| 527 |
with gr.Row(variant="panel", elem_classes="responsive-row"):
|
| 528 |
with gr.Column(scale=1, min_width=400, elem_classes="model-dropdown-container"):
|
| 529 |
model_dropdown = gr.Dropdown(
|
styles.css
CHANGED
|
@@ -1,5 +1,43 @@
|
|
| 1 |
:root {
|
| 2 |
--color-grey-50: #f9fafb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
}
|
| 4 |
|
| 5 |
.toast-body {
|
|
@@ -59,13 +97,17 @@ button.cancel:hover, .cancel[disabled] {
|
|
| 59 |
}
|
| 60 |
|
| 61 |
div.block.chatbot {
|
| 62 |
-
height: calc(100svh -
|
| 63 |
max-height: 900px !important;
|
| 64 |
}
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
@media (max-width: 1280px) {
|
| 67 |
div.block.chatbot {
|
| 68 |
-
height: calc(-
|
| 69 |
}
|
| 70 |
}
|
| 71 |
|
|
@@ -85,7 +127,7 @@ div.block.chatbot {
|
|
| 85 |
}
|
| 86 |
|
| 87 |
div.block.chatbot {
|
| 88 |
-
height: calc(-
|
| 89 |
}
|
| 90 |
}
|
| 91 |
|
|
@@ -112,7 +154,6 @@ div.block.chatbot {
|
|
| 112 |
@media (max-height: 932px) {
|
| 113 |
.chatbot {
|
| 114 |
max-height: 500px !important;
|
| 115 |
-
/*min-height: 320px;*/
|
| 116 |
}
|
| 117 |
}
|
| 118 |
|
|
|
|
| 1 |
:root {
|
| 2 |
--color-grey-50: #f9fafb;
|
| 3 |
+
--banner-background: var(--secondary-400);
|
| 4 |
+
--banner-text-color: var(--primary-100);
|
| 5 |
+
--banner-background-dark: var(--secondary-800);
|
| 6 |
+
--banner-text-color-dark: var(--primary-100);
|
| 7 |
+
--banner-chrome-height: calc(16px + 43px);
|
| 8 |
+
|
| 9 |
+
/* Chrome height with no banner */
|
| 10 |
+
--chat-chrome-height-wide-no-banner: 320px;
|
| 11 |
+
--chat-chrome-height-narrow-no-banner: 450px;
|
| 12 |
+
|
| 13 |
+
/* Use these when we are not using a banner */
|
| 14 |
+
/*--chat-chrome-height-wide: var(--chat-chrome-height-wide-no-banner);*/
|
| 15 |
+
/*--chat-chrome-height-narrow: var(--chat-chrome-height-narrow-no-banner);*/
|
| 16 |
+
|
| 17 |
+
/* When we are using a banner, add the banner height to the chat chrome height */
|
| 18 |
+
--chat-chrome-height-wide: calc(var(--chat-chrome-height-wide-no-banner) + var(--banner-chrome-height));
|
| 19 |
+
--chat-chrome-height-narrow: calc(var(--chat-chrome-height-narrow-no-banner) + var(--banner-chrome-height));
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.banner-message {
|
| 23 |
+
background-color: var(--banner-background);
|
| 24 |
+
padding: 5px;
|
| 25 |
+
margin: 0;
|
| 26 |
+
border-radius: 5px;
|
| 27 |
+
border: none;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
.banner-message-text {
|
| 31 |
+
font-size: 13px;
|
| 32 |
+
font-weight: bolder;
|
| 33 |
+
color: var(--banner-text-color) !important;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
body.dark .banner-message {
|
| 37 |
+
background-color: var(--banner-background-dark) !important;
|
| 38 |
+
}
|
| 39 |
+
body.dark .gradio-container .contain .banner-message .banner-message-text {
|
| 40 |
+
color: var(--banner-text-color-dark) !important;
|
| 41 |
}
|
| 42 |
|
| 43 |
.toast-body {
|
|
|
|
| 97 |
}
|
| 98 |
|
| 99 |
div.block.chatbot {
|
| 100 |
+
height: calc(100svh - var(--chat-chrome-height-wide)) !important;
|
| 101 |
max-height: 900px !important;
|
| 102 |
}
|
| 103 |
|
| 104 |
+
div.no-padding {
|
| 105 |
+
padding: 0 !important;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
@media (max-width: 1280px) {
|
| 109 |
div.block.chatbot {
|
| 110 |
+
height: calc(100svh - var(--chat-chrome-height-wide)) !important;
|
| 111 |
}
|
| 112 |
}
|
| 113 |
|
|
|
|
| 127 |
}
|
| 128 |
|
| 129 |
div.block.chatbot {
|
| 130 |
+
height: calc(100svh - var(--chat-chrome-height-narrow)) !important;
|
| 131 |
}
|
| 132 |
}
|
| 133 |
|
|
|
|
| 154 |
@media (max-height: 932px) {
|
| 155 |
.chatbot {
|
| 156 |
max-height: 500px !important;
|
|
|
|
| 157 |
}
|
| 158 |
}
|
| 159 |
|