|
|
|
|
|
from osgeo import gdal |
|
|
|
|
|
import os |
|
|
from config import OUTPUT_DIR |
|
|
import gradio as gr |
|
|
import logging |
|
|
from inference_tab import get_inference_widgets, run_inference,georefImg |
|
|
from annotation_tab import get_annotation_widgets |
|
|
from map_tab import get_map_widgets |
|
|
from strgrid_tab import get_strgrid_widgets |
|
|
|
|
|
|
|
|
logging.basicConfig(level=logging.DEBUG) |
|
|
|
|
|
|
|
|
|
|
|
with gr.Blocks() as demo: |
|
|
selected_tile_state=gr.State(value=None) |
|
|
with gr.Tab("Inference"): |
|
|
image_input, gcp_input, city_name,user_crs, score_th, hist_th, hist_dic, run_button, output, download_file = get_inference_widgets(run_inference,georefImg, selected_tile_state) |
|
|
with gr.Tab("Annotation"): |
|
|
get_annotation_widgets(selected_tile_state) |
|
|
with gr.Tab("Map"): |
|
|
get_map_widgets(city_name) |
|
|
with gr.Tab("Street Grid"): |
|
|
get_strgrid_widgets() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
demo.launch(inbrowser=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|