| import gradio as gr | |
| from spatial_diffusion import create_diffusion_interface | |
| from geo_boundary_translator import create_translator_interface | |
| def create_combined_interface(): | |
| """Create the main application with tabs for different geographic tools.""" | |
| with gr.Blocks(title="Geographic Analysis Toolkit") as combined_app: | |
| gr.Markdown( | |
| """ | |
| <div style=" | |
| background-color: #4B23C0; | |
| color: white; | |
| padding: 20px; | |
| text-align: left; | |
| font-size: 28px; | |
| font-weight: bold; | |
| margin: 0; | |
| border-radius: 4px; | |
| "> | |
| MOPAC | DS - 🗺️ Geographic Analysis Toolkit | |
| </div> | |
| """, | |
| sanitize_html=False | |
| ) | |
| with gr.Tabs() as tabs: | |
| with gr.TabItem("GeoBoundary Translator"): | |
| create_translator_interface() | |
| with gr.TabItem("Spatial Diffusion Tool"): | |
| create_diffusion_interface() | |
| return combined_app | |
| if __name__ == "__main__": | |
| app = create_combined_interface() | |
| app.launch() |