Spaces:
Running
Running
Feature(LLMLingua): changing the style
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ with gr.Blocks(css=custom_css) as iface:
|
|
61 |
gr.Markdown(INTRO)
|
62 |
|
63 |
with gr.Row():
|
64 |
-
with gr.Column(elem_id="prompt"):
|
65 |
with gr.Tab('Prompts'):
|
66 |
instruction = gr.Textbox(
|
67 |
label="Instruction",
|
@@ -78,7 +78,7 @@ with gr.Blocks(css=custom_css) as iface:
|
|
78 |
lines=1,
|
79 |
value="",
|
80 |
)
|
81 |
-
with gr.Column(elem_id="params"):
|
82 |
with gr.Tab('Compression Target'):
|
83 |
target_token = gr.Textbox(
|
84 |
label="Target Token (To use this, set Compression Ratio to 0)",
|
@@ -92,14 +92,13 @@ with gr.Blocks(css=custom_css) as iface:
|
|
92 |
gen_button = gr.Button(value="Compress Prompt!", variant="primary")
|
93 |
|
94 |
with gr.Row():
|
95 |
-
with gr.Column(elem_id="Results"):
|
96 |
with gr.Tab('Compressed Prompts'):
|
97 |
compressed_prompt = gr.Textbox(
|
98 |
label="compressed_prompt",
|
99 |
lines=5,
|
100 |
)
|
101 |
-
|
102 |
-
with gr.Column(elem_id="Results_2"):
|
103 |
with gr.Tab('Saving'):
|
104 |
origin_tokens = gr.Textbox(
|
105 |
label="The tokens number of original prompt",
|
|
|
61 |
gr.Markdown(INTRO)
|
62 |
|
63 |
with gr.Row():
|
64 |
+
with gr.Column(elem_id="prompt", scale=2):
|
65 |
with gr.Tab('Prompts'):
|
66 |
instruction = gr.Textbox(
|
67 |
label="Instruction",
|
|
|
78 |
lines=1,
|
79 |
value="",
|
80 |
)
|
81 |
+
with gr.Column(elem_id="params", scale=1):
|
82 |
with gr.Tab('Compression Target'):
|
83 |
target_token = gr.Textbox(
|
84 |
label="Target Token (To use this, set Compression Ratio to 0)",
|
|
|
92 |
gen_button = gr.Button(value="Compress Prompt!", variant="primary")
|
93 |
|
94 |
with gr.Row():
|
95 |
+
with gr.Column(elem_id="Results", scale=2):
|
96 |
with gr.Tab('Compressed Prompts'):
|
97 |
compressed_prompt = gr.Textbox(
|
98 |
label="compressed_prompt",
|
99 |
lines=5,
|
100 |
)
|
101 |
+
with gr.Column(elem_id="Results_2", scale=1):
|
|
|
102 |
with gr.Tab('Saving'):
|
103 |
origin_tokens = gr.Textbox(
|
104 |
label="The tokens number of original prompt",
|