qianhuiwu commited on
Commit
91d6df8
1 Parent(s): 0712d49

Change default base model to mbert-base due to limited computation.

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,7 +35,7 @@ def compress(original_prompt, compression_rate, base_model="xlm-roberta-large",
35
  idx = force_tokens.index('\\n')
36
  force_tokens[idx] = '\n'
37
 
38
- compressor = compressors.get(base_model, compressors["xlm-roberta-large"])
39
  results = compressor.compress_prompt_llmlingua2(
40
  original_prompt,
41
  rate=compression_rate,
@@ -86,7 +86,7 @@ with gr.Blocks(title=title, css=css) as app: # 'YenLai/Superhuman' 'HaleyCH/Hale
86
  compressed_prompt = gr.Textbox(value='', label="Compressed Prompt", lines=10, max_lines=10, interactive=False)
87
 
88
  with gr.Column(scale=1):
89
- base_model = gr.Radio(["xlm-roberta-large", "mbert-base"], label="Base Model", value="xlm-roberta-large", interactive=True)
90
  force_tokens = gr.Dropdown(['\\n', '.', '!', '?', ','],
91
  label="Tokens to Preserve",
92
  value=['\\n', '.', '!', '?', ','],
 
35
  idx = force_tokens.index('\\n')
36
  force_tokens[idx] = '\n'
37
 
38
+ compressor = compressors.get(base_model, compressors["mbert-base"])
39
  results = compressor.compress_prompt_llmlingua2(
40
  original_prompt,
41
  rate=compression_rate,
 
86
  compressed_prompt = gr.Textbox(value='', label="Compressed Prompt", lines=10, max_lines=10, interactive=False)
87
 
88
  with gr.Column(scale=1):
89
+ base_model = gr.Radio(["mbert-base", "xlm-roberta-large"], label="Base Model", value="mbert-base", interactive=True)
90
  force_tokens = gr.Dropdown(['\\n', '.', '!', '?', ','],
91
  label="Tokens to Preserve",
92
  value=['\\n', '.', '!', '?', ','],