Jae-Won Chung commited on
Commit
e8521fb
1 Parent(s): 0d43f69

Disable markup when printing input/outputs

Browse files
Files changed (1) hide show
  1. benchmark.py +2 -2
benchmark.py CHANGED
@@ -176,7 +176,7 @@ def main(
176
 
177
  # Print input prompt.
178
  rich.print(f"\n[u cyan]{'Warmup ' if is_warmup else ''}Prompt[/u cyan]:")
179
- print(prompt.strip() + "\n")
180
 
181
  # Generate the ouptut from the model.
182
  output_stream = generate_stream(model, tokenizer, gen_params, device="cuda")
@@ -218,7 +218,7 @@ def main(
218
 
219
  # Print the response.
220
  rich.print(f"\n[u cyan]{'Warmup ' if is_warmup else ''}Response[/u cyan]:")
221
- print(output_text.strip() + "\n")
222
 
223
  # Print measurement.
224
  rich.print(measurements)
 
176
 
177
  # Print input prompt.
178
  rich.print(f"\n[u cyan]{'Warmup ' if is_warmup else ''}Prompt[/u cyan]:")
179
+ rich.get_console().print(prompt.strip() + "\n", markup=False)
180
 
181
  # Generate the ouptut from the model.
182
  output_stream = generate_stream(model, tokenizer, gen_params, device="cuda")
 
218
 
219
  # Print the response.
220
  rich.print(f"\n[u cyan]{'Warmup ' if is_warmup else ''}Response[/u cyan]:")
221
+ rich.get_console().print(output_text.strip() + "\n")
222
 
223
  # Print measurement.
224
  rich.print(measurements)