histOSM / app.py
muk42's picture
added tiling num to annotations
6911988
raw
history blame contribute delete
886 Bytes
# [DEBUG]
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
# setup logging
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)
# [DEBUG]
demo.launch(inbrowser=True)
# [PROD]
#demo.launch(server_name="0.0.0.0", server_port=7860, inbrowser=False)