def _display_main()

in src/ui/ui.py [0:0]


    def _display_main(self, results=None, sql_query=None, rendered_sql=None):
        """Display the main output

        Args:
            results (pd.DataFrame): Results from the execute query. Default None for not printing.
            sql_query (str): Predicted general SQL query. Default None for not printing.
            rendered_sql (str): Rendered SQL query. Default None for not printing.

        Returns:
            None

        """
        self.general_output_vsection.clear_output()
        html_detected_entities = self.visualize_entities(
            self.entities, prepare_visualization_input_for_raw_entities
        )
        html_replaced_entities = self.visualize_entities(
            self.proc_entities, prepare_visualization_input_for_processed_entities
        )

        with self.general_output_vsection:
            print("\n• The following key entities have been detected:")
            display(html_detected_entities)
            print(
                "\n• Drugs and Conditions will be respectively replaced by the following RxNorm & ICD10 codes:"
            )
            display(html_replaced_entities)

            if sql_query:
                print("\n• Predicted SQL query:")
                display(sql_query)
            if rendered_sql:
                print("\n• Rendered SQL query:")
                display(rendered_sql)
            if isinstance(results, pd.DataFrame):
                print("\n• Request run successfully ✅. Results in the following table:")
                display(results)
            elif isinstance(results, str):
                print(results)