File size: 886 Bytes
a0f7b41
f8b90ea
862e4d8
95327ef
 
dd95454
2cfdd88
16a059c
2be323a
16a059c
2cfdd88
5957aca
2cfdd88
dd95454
a0f7b41
f8b90ea
2be323a
6911988
2be323a
6911988
2be323a
6911988
f8b90ea
 
ed2bf63
 
 
5957aca
a0f7b41
f8b90ea
5957aca
a0f7b41
f8b90ea
5957aca
 
dd95454
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# [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)