Update app.py
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ except Exception as e:
|
|
| 29 |
with gr.Blocks(title="DeepV for RTL (Model-Agnostic)", theme=gr.themes.Soft()) as demo:
|
| 30 |
gr.Markdown("## DeepV for RTL Code Generation — Model-Agnostic (Bring Your Own API Key)", elem_id="main-title")
|
| 31 |
|
| 32 |
-
with gr.Row():
|
| 33 |
with gr.Column(scale=2):
|
| 34 |
with gr.Row():
|
| 35 |
model_choice = gr.Dropdown(
|
|
@@ -55,7 +55,7 @@ with gr.Blocks(title="DeepV for RTL (Model-Agnostic)", theme=gr.themes.Soft()) a
|
|
| 55 |
use_rag = gr.Checkbox(value=True, label="Use Retrieval (RAG)")
|
| 56 |
top_k = gr.Slider(1, 10, value=3, step=1, label="Top-K retrieved examples")
|
| 57 |
|
| 58 |
-
with gr.Accordion("Generation Settings", open=False):
|
| 59 |
temperature = gr.Slider(0.0, 1.5, value=0.2, step=0.05, label="Temperature")
|
| 60 |
top_p = gr.Slider(0.1, 1.0, value=0.9, step=0.05, label="Top-p")
|
| 61 |
max_new_tokens = gr.Slider(128, 4096, value=768, step=64, label="Max tokens")
|
|
@@ -144,9 +144,16 @@ with gr.Blocks(title="DeepV for RTL (Model-Agnostic)", theme=gr.themes.Soft()) a
|
|
| 144 |
demo.css = """
|
| 145 |
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');
|
| 146 |
|
| 147 |
-
/*
|
| 148 |
-
|
| 149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
}
|
| 151 |
|
| 152 |
#main-title {
|
|
|
|
| 29 |
with gr.Blocks(title="DeepV for RTL (Model-Agnostic)", theme=gr.themes.Soft()) as demo:
|
| 30 |
gr.Markdown("## DeepV for RTL Code Generation — Model-Agnostic (Bring Your Own API Key)", elem_id="main-title")
|
| 31 |
|
| 32 |
+
with gr.Row(elem_id="main-row"):
|
| 33 |
with gr.Column(scale=2):
|
| 34 |
with gr.Row():
|
| 35 |
model_choice = gr.Dropdown(
|
|
|
|
| 55 |
use_rag = gr.Checkbox(value=True, label="Use Retrieval (RAG)")
|
| 56 |
top_k = gr.Slider(1, 10, value=3, step=1, label="Top-K retrieved examples")
|
| 57 |
|
| 58 |
+
with gr.Accordion("Generation Settings", open=False, container=False):
|
| 59 |
temperature = gr.Slider(0.0, 1.5, value=0.2, step=0.05, label="Temperature")
|
| 60 |
top_p = gr.Slider(0.1, 1.0, value=0.9, step=0.05, label="Top-p")
|
| 61 |
max_new_tokens = gr.Slider(128, 4096, value=768, step=64, label="Max tokens")
|
|
|
|
| 144 |
demo.css = """
|
| 145 |
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');
|
| 146 |
|
| 147 |
+
/* NEW: Force flexbox behavior on the main row */
|
| 148 |
+
#main-row {
|
| 149 |
+
display: flex;
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
/* NEW: Fixes the jitter when accordion opens */
|
| 153 |
+
.gr-accordion {
|
| 154 |
+
display: flex;
|
| 155 |
+
flex-direction: column;
|
| 156 |
+
width: 100%;
|
| 157 |
}
|
| 158 |
|
| 159 |
#main-title {
|