| """ | |
| Curriculum Alignment Inference Application | |
| Hugging Face Space for predicting alignment between CLO and Sub-CLO. | |
| """ | |
| import gradio as gr | |
| from ui.tabs import create_all_tabs | |
| def create_app() -> gr.Blocks: | |
| """ | |
| Create the main Gradio application. | |
| Returns: | |
| Configured Gradio Blocks application | |
| """ | |
| with gr.Blocks( | |
| title="Curriculum Alignment Inference", | |
| theme=gr.themes.Soft() | |
| ) as app: | |
| # Header | |
| gr.Markdown("# 🎓 Curriculum Alignment Inference") | |
| gr.Markdown( | |
| "Predict alignment between Course Learning Outcomes (CLO) and Sub-CLO " | |
| "using different machine learning models." | |
| ) | |
| # Load description from assets if available | |
| try: | |
| with open("assets/description.md", "r", encoding="utf-8") as f: | |
| description = f.read() | |
| if description.strip(): | |
| gr.Markdown(description) | |
| except FileNotFoundError: | |
| pass | |
| gr.Markdown("---") | |
| # Create all model tabs | |
| with gr.Tabs(): | |
| create_all_tabs() | |
| # Footer | |
| gr.Markdown("---") | |
| gr.Markdown( | |
| "**Note:** Alignment is determined by:\n" | |
| "- Same Bloom domain (Cognitive/Affective/Psychomotor)\n" | |
| "- Sub-CLO level ≤ CLO level" | |
| ) | |
| return app | |
| # Create and launch the app | |
| app = create_app() | |
| if __name__ == "__main__": | |
| app.launch() |