feedback_forensics.app.utils#
Module Contents#
Functions#
Get the path to an image in the assets directory. |
|
Get the path to an image in the assets directory, via gradio files api. |
|
Get the column names from a CSV file. |
|
Load a JSON file. |
|
Convert an iterable to a string with maximum item count. |
API#
- feedback_forensics.app.utils.get_image_path(image_name: str) pathlib.Path#
Get the path to an image in the assets directory.
- feedback_forensics.app.utils.get_gradio_image_path(image_name: str) str#
Get the path to an image in the assets directory, via gradio files api.
- feedback_forensics.app.utils.get_csv_columns(file_path: str | pathlib.Path) list[str]#
Get the column names from a CSV file.
Args: file_path: Path to the CSV file
Returns: List of column names
- feedback_forensics.app.utils.load_json_file(file_path: str | pathlib.Path) dict#
Load a JSON file.
Args: file_path: Path to the JSON file
- feedback_forensics.app.utils.iter_to_trunc_str(iter, max_items)#
Convert an iterable to a string with maximum item count.