From 02b97701810a18bd3437ddbbb380ddc2dbbc7478 Mon Sep 17 00:00:00 2001 From: cornzz <39997278+cornzz@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:53:17 +0300 Subject: [PATCH] Fix compress only mode --- src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 8230539..adf107b 100644 --- a/src/app.py +++ b/src/app.py @@ -181,7 +181,7 @@ def run_demo( if compress_only: compressed, diff, metrics, compression_time = compress_prompt(prompt, rate, force_tokens, bool(force_digits)) metrics["Compression"] = [f"{compression_time:.2f}s"] - return [compressed, diff, metrics] + [None] * 4 + [gr.Button(interactive=False)] * 3 + return [compressed, diff, metrics] + [None] * 4 + [gr.Button(interactive=not error)] * 4 + [[None, None]] with ThreadPoolExecutor() as executor: get_query = lambda p: f"{question}\n\n{p}" if question else p