Spaces:
Running
Running
Jae-Won Chung
commited on
Commit
•
0d43f69
1
Parent(s):
72086f7
Do not print input and output with rich
Browse files- benchmark.py +4 -2
benchmark.py
CHANGED
@@ -175,7 +175,8 @@ def main(
|
|
175 |
gen_params["prompt"] = prompt
|
176 |
|
177 |
# Print input prompt.
|
178 |
-
rich.print(f"\n[u]{'Warmup ' if is_warmup else ''}Prompt[/u]
|
|
|
179 |
|
180 |
# Generate the ouptut from the model.
|
181 |
output_stream = generate_stream(model, tokenizer, gen_params, device="cuda")
|
@@ -216,7 +217,8 @@ def main(
|
|
216 |
output_json.flush()
|
217 |
|
218 |
# Print the response.
|
219 |
-
rich.print(f"\n[u]{'Warmup ' if is_warmup else ''}Response[/u]
|
|
|
220 |
|
221 |
# Print measurement.
|
222 |
rich.print(measurements)
|
|
|
175 |
gen_params["prompt"] = prompt
|
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")
|
|
|
217 |
output_json.flush()
|
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)
|