diva.gui.service_streamlit package¶
Submodules¶
diva.gui.service_streamlit.main module¶
This is the main python function for the generation of the streamlit interface service
- diva.gui.service_streamlit.main.main(updating=False)[source]¶
Build and run the DestinE Chatbot application interface.
This function sets up the application’s main interface and manages its core components, including: - Configuring the Streamlit page layout and initializing authentication. - Setting up the sidebar with navigation options. - Managing the main tabs and their associated content, such as banners, session handling, and tabbed navigation.
Parameters¶
- updatingbool, optional
If True, displays a message indicating that the DIVA feature is currently unavailable due to an update and prevents the full application from loading. Default is False.
Returns¶
None
diva.gui.service_streamlit.tab1 module¶
Tab 1 that contains the chatbot page
- diva.gui.service_streamlit.tab1.get_module_llm()[source]¶
Imports and returns the default language model module.
This function dynamically imports the module_llm from the llm package and returns the default language model (default_llm) defined within that module.
Returns:¶
- object
The default language model (default_llm) from the module_llm.
- diva.gui.service_streamlit.tab1.main(tab1_options)[source]¶
Defines and manages the main page of the application within Tab 1, including chatbot interactions and graph visualizations.
This function initializes the necessary components (language model, chat module, configuration), manages the chat history, and handles user input for interacting with the chatbot. It supports both simple discussions and requests for visualizations, displaying the results accordingly.
Parameters:¶
- tab1_optionsdict
A dictionary containing options related to the current tab, including language selection and a flag to clear the conversation history.
Returns:¶
None
diva.gui.service_streamlit.tab2 module¶
- diva.gui.service_streamlit.tab2.main(tab2_options)[source]¶
Defines the content and layout of Tab 2, which includes documentation and examples for using the DIVA application.
This function sets up the user interface for Tab 2, providing examples of natural language queries, links to documentation, and information about the available data within the DIVA package. It includes code snippets, links to external resources, and a summary of data availability.
Parameters:¶
- tab2_optionsdict
A dictionary containing options related to the current tab. (Not currently used in this function.)
Returns:¶
None