fcas / scripts /test_ui_imports.py
lsempe's picture
Update app and remove old files
48c2af7
raw
history blame contribute delete
613 Bytes
"""
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()