MCPcopy
hub / github.com/huggingface/transformers / print_color

Method print_color

src/transformers/cli/chat.py:189–192  ·  view source on GitHub ↗

Prints text in a given color to the console.

(self, text: str, color: str)

Source from the content-addressed store, hash-verified

187 self._console.print()
188
189 def print_color(self, text: str, color: str):
190 """Prints text in a given color to the console."""
191 self._console.print(f"[bold {color}]{text}")
192 self._console.print()
193
194 def confirm(self, message: str, default: bool = False) -> bool:
195 """Displays a yes/no prompt to the user, returning True for confirmation."""

Callers 2

_inner_runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected