Spaces:
Runtime error
Runtime error
zetavg
commited on
Commit
•
a0c076d
1
Parent(s):
701dba0
position sticky
Browse files- llama_lora/ui/inference_ui.py +17 -16
- llama_lora/ui/main_page.py +17 -0
llama_lora/ui/inference_ui.py
CHANGED
@@ -285,22 +285,23 @@ def inference_ui():
|
|
285 |
stop_btn = gr.Button(
|
286 |
"Stop", variant="stop", label="Stop Iterating", elem_id="inference_stop_btn")
|
287 |
|
288 |
-
with gr.Column():
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
|
|
304 |
|
305 |
show_raw.change(
|
306 |
fn=lambda show_raw: gr.Accordion.update(visible=show_raw),
|
|
|
285 |
stop_btn = gr.Button(
|
286 |
"Stop", variant="stop", label="Stop Iterating", elem_id="inference_stop_btn")
|
287 |
|
288 |
+
with gr.Column(elem_id="inference_output_group_container"):
|
289 |
+
with gr.Column(elem_id="inference_output_group"):
|
290 |
+
inference_output = gr.Textbox(
|
291 |
+
lines=12, label="Output", elem_id="inference_output")
|
292 |
+
inference_output.style(show_copy_button=True)
|
293 |
+
with gr.Accordion(
|
294 |
+
"Raw Output",
|
295 |
+
open=not default_show_raw,
|
296 |
+
visible=default_show_raw,
|
297 |
+
elem_id="inference_inference_raw_output_accordion"
|
298 |
+
) as raw_output_group:
|
299 |
+
inference_raw_output = gr.Code(
|
300 |
+
label="Raw Output",
|
301 |
+
show_label=False,
|
302 |
+
language="json",
|
303 |
+
interactive=False,
|
304 |
+
elem_id="inference_raw_output")
|
305 |
|
306 |
show_raw.change(
|
307 |
fn=lambda show_raw: gr.Accordion.update(visible=show_raw),
|
llama_lora/ui/main_page.py
CHANGED
@@ -77,6 +77,12 @@ def get_page_title():
|
|
77 |
|
78 |
def main_page_custom_css():
|
79 |
css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
.app_title_text {
|
81 |
display: inline-block;
|
82 |
margin-right: 0.5em !important;
|
@@ -177,6 +183,17 @@ def main_page_custom_css():
|
|
177 |
pointer-events: none;
|
178 |
}
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
#dataset_plain_text_input_variables_separator textarea,
|
181 |
#dataset_plain_text_input_and_output_separator textarea,
|
182 |
#dataset_plain_text_data_separator textarea {
|
|
|
77 |
|
78 |
def main_page_custom_css():
|
79 |
css = """
|
80 |
+
/* to make position stick work */
|
81 |
+
.gradio-container {
|
82 |
+
overflow-x: initial !important;
|
83 |
+
overflow-y: clip !important;
|
84 |
+
}
|
85 |
+
|
86 |
.app_title_text {
|
87 |
display: inline-block;
|
88 |
margin-right: 0.5em !important;
|
|
|
183 |
pointer-events: none;
|
184 |
}
|
185 |
|
186 |
+
/* position sticky */
|
187 |
+
#inference_output_group_container {
|
188 |
+
display: block;
|
189 |
+
}
|
190 |
+
#inference_output_group {
|
191 |
+
position: -webkit-sticky;
|
192 |
+
position: sticky;
|
193 |
+
top: 16px;
|
194 |
+
bottom: 16px;
|
195 |
+
}
|
196 |
+
|
197 |
#dataset_plain_text_input_variables_separator textarea,
|
198 |
#dataset_plain_text_input_and_output_separator textarea,
|
199 |
#dataset_plain_text_data_separator textarea {
|