Spaces:
Sleeping
Sleeping
full height
Browse files
app.py
CHANGED
|
@@ -131,8 +131,21 @@ custom_theme = gr.themes.Soft(
|
|
| 131 |
block_title_text_weight="600",
|
| 132 |
)
|
| 133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
# Build the Gradio interface
|
| 135 |
-
with gr.Blocks(theme=custom_theme, fill_height=True) as demo:
|
| 136 |
gr.Markdown(
|
| 137 |
"""
|
| 138 |
# 🤖 Smol LLM Chat
|
|
@@ -141,7 +154,7 @@ with gr.Blocks(theme=custom_theme, fill_height=True) as demo:
|
|
| 141 |
"""
|
| 142 |
)
|
| 143 |
|
| 144 |
-
with gr.Row():
|
| 145 |
with gr.Column(scale=1, min_width=200):
|
| 146 |
with gr.Accordion("⚙️ Parameters", open=False):
|
| 147 |
max_tokens = gr.Slider(
|
|
@@ -178,7 +191,7 @@ with gr.Blocks(theme=custom_theme, fill_height=True) as demo:
|
|
| 178 |
lines=2
|
| 179 |
)
|
| 180 |
|
| 181 |
-
with gr.Column(scale=4):
|
| 182 |
# Chat Interface
|
| 183 |
chat_interface = gr.ChatInterface(
|
| 184 |
fn=chat_predict,
|
|
|
|
| 131 |
block_title_text_weight="600",
|
| 132 |
)
|
| 133 |
|
| 134 |
+
# Custom CSS to force full height
|
| 135 |
+
css = """
|
| 136 |
+
.gradio-container {
|
| 137 |
+
height: 100vh !important;
|
| 138 |
+
}
|
| 139 |
+
#main-row {
|
| 140 |
+
height: calc(100vh - 120px) !important;
|
| 141 |
+
}
|
| 142 |
+
#chat-col {
|
| 143 |
+
height: 100% !important;
|
| 144 |
+
}
|
| 145 |
+
"""
|
| 146 |
+
|
| 147 |
# Build the Gradio interface
|
| 148 |
+
with gr.Blocks(theme=custom_theme, css=css, fill_height=True) as demo:
|
| 149 |
gr.Markdown(
|
| 150 |
"""
|
| 151 |
# 🤖 Smol LLM Chat
|
|
|
|
| 154 |
"""
|
| 155 |
)
|
| 156 |
|
| 157 |
+
with gr.Row(elem_id="main-row"):
|
| 158 |
with gr.Column(scale=1, min_width=200):
|
| 159 |
with gr.Accordion("⚙️ Parameters", open=False):
|
| 160 |
max_tokens = gr.Slider(
|
|
|
|
| 191 |
lines=2
|
| 192 |
)
|
| 193 |
|
| 194 |
+
with gr.Column(scale=4, elem_id="chat-col"):
|
| 195 |
# Chat Interface
|
| 196 |
chat_interface = gr.ChatInterface(
|
| 197 |
fn=chat_predict,
|