iofu728 commited on
Commit
11fdf65
1 Parent(s): 13a67fb

Feature(LLMLingua): build the LLMLingua space demo

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -48,7 +48,7 @@ custom_css = """
48
  """
49
 
50
  def compress_prompt(context, instruction, question, ratio, target_token):
51
- compressed_prompt = llm_lingua.compress_prompt(context.split("\n\n"), instruction, question, ratio, target_token)
52
 
53
  return [compressed_prompt[key] for key in ["compressed_prompt", "origin_tokens", "compressed_tokens", "ratio", "saving"]]
54
 
 
48
  """
49
 
50
  def compress_prompt(context, instruction, question, ratio, target_token):
51
+ compressed_prompt = llm_lingua.compress_prompt(context.split("\n\n"), instruction, question, float(ratio), float(target_token))
52
 
53
  return [compressed_prompt[key] for key in ["compressed_prompt", "origin_tokens", "compressed_tokens", "ratio", "saving"]]
54