Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -133,9 +133,12 @@ theme = gr.themes.Soft(
|
|
| 133 |
with gr.Blocks(title="AI Python Tutor", theme=theme, fill_height=True) as demo:
|
| 134 |
# --- Header with Model Selector ---
|
| 135 |
with gr.Row(variant="compact", elem_classes="header-row"):
|
| 136 |
-
|
|
|
|
| 137 |
gr.Markdown("## 🐍 AI Python Tutor")
|
| 138 |
-
|
|
|
|
|
|
|
| 139 |
model_selector = gr.Dropdown(
|
| 140 |
choices=AVAILABLE_MODELS,
|
| 141 |
value=AVAILABLE_MODELS[0], # Default to 20b
|
|
@@ -144,6 +147,10 @@ with gr.Blocks(title="AI Python Tutor", theme=theme, fill_height=True) as demo:
|
|
| 144 |
container=True,
|
| 145 |
scale=1
|
| 146 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
|
| 148 |
with gr.Row(equal_height=True):
|
| 149 |
# Left Column: Chat & Input
|
|
|
|
| 133 |
with gr.Blocks(title="AI Python Tutor", theme=theme, fill_height=True) as demo:
|
| 134 |
# --- Header with Model Selector ---
|
| 135 |
with gr.Row(variant="compact", elem_classes="header-row"):
|
| 136 |
+
# scale=0 forces the column to only be as wide as its content (approx)
|
| 137 |
+
with gr.Column(scale=0, min_width=250):
|
| 138 |
gr.Markdown("## 🐍 AI Python Tutor")
|
| 139 |
+
|
| 140 |
+
# scale=0 keeps this compact next to the title
|
| 141 |
+
with gr.Column(scale=0, min_width=250):
|
| 142 |
model_selector = gr.Dropdown(
|
| 143 |
choices=AVAILABLE_MODELS,
|
| 144 |
value=AVAILABLE_MODELS[0], # Default to 20b
|
|
|
|
| 147 |
container=True,
|
| 148 |
scale=1
|
| 149 |
)
|
| 150 |
+
|
| 151 |
+
# scale=1 spacer pushes everything to the left
|
| 152 |
+
with gr.Column(scale=1):
|
| 153 |
+
pass
|
| 154 |
|
| 155 |
with gr.Row(equal_height=True):
|
| 156 |
# Left Column: Chat & Input
|