| """ | |
| Quick import smoke-test for UI modules after we removed some tabs and added generator callback. | |
| """ | |
| import importlib | |
| import os | |
| import sys | |
| # Ensure project root is on sys.path so imports from repository root work | |
| ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) | |
| if ROOT not in sys.path: | |
| sys.path.insert(0, ROOT) | |
| def main(): | |
| spec = importlib.util.find_spec('gradio_components') | |
| print('gradio_components spec found:', spec is not None) | |
| import gradio_components as gc | |
| print('create_qa_tab exists:', hasattr(gc, 'create_qa_tab')) | |
| if __name__ == '__main__': | |
| main() | |