Romain Graux commited on
Commit
a730958
β€’
1 Parent(s): 9286023

Move app to root

Browse files
app/app.py β†’ app.py RENAMED
@@ -14,9 +14,9 @@ import sys
14
  import numpy as np
15
  from PIL import Image, ImageDraw
16
  import gradio as gr
17
- from tiff_utils import extract_physical_metadata
18
- from dl_inference import inference_fn
19
- from knn import knn, segment_image, bokeh_plot_knn, color_palette
20
 
21
  import tempfile
22
  import shutil
@@ -368,6 +368,5 @@ block.launch(
368
  share=False,
369
  show_error=True,
370
  server_name="0.0.0.0",
371
- server_port=9003,
372
  enable_queue=True,
373
  )
 
14
  import numpy as np
15
  from PIL import Image, ImageDraw
16
  import gradio as gr
17
+ from app.tiff_utils import extract_physical_metadata
18
+ from app.dl_inference import inference_fn
19
+ from app.knn import knn, segment_image, bokeh_plot_knn, color_palette
20
 
21
  import tempfile
22
  import shutil
 
368
  share=False,
369
  show_error=True,
370
  server_name="0.0.0.0",
 
371
  enable_queue=True,
372
  )
app/__init__.py ADDED
File without changes
app/dl_inference.py CHANGED
@@ -10,6 +10,7 @@
10
  from functools import lru_cache
11
  import sys
12
 
 
13
  if ".." not in sys.path:
14
  sys.path.append("..")
15
 
@@ -23,7 +24,6 @@ from utils.constants import ModelArgs
23
  from utils.paths import MODELS_PATH, DATASET_PATH
24
  from atoms_detection.dl_detection import DLDetection
25
  from atoms_detection.evaluation import Evaluation
26
- from tiff_utils import tiff_to_png
27
 
28
  LOGS_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "logs")
29
  VOID_DS = os.path.join(DATASET_PATH, "void.csv")
 
10
  from functools import lru_cache
11
  import sys
12
 
13
+ from .tiff_utils import tiff_to_png
14
  if ".." not in sys.path:
15
  sys.path.append("..")
16
 
 
24
  from utils.paths import MODELS_PATH, DATASET_PATH
25
  from atoms_detection.dl_detection import DLDetection
26
  from atoms_detection.evaluation import Evaluation
 
27
 
28
  LOGS_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "logs")
29
  VOID_DS = os.path.join(DATASET_PATH, "void.csv")
app/knn.py CHANGED
@@ -15,7 +15,7 @@ import matplotlib
15
  import numpy as np
16
  import os
17
  import seaborn as sns
18
- from logger import logger
19
 
20
 
21
  matplotlib.use("agg")
 
15
  import numpy as np
16
  import os
17
  import seaborn as sns
18
+ from .logger import logger
19
 
20
 
21
  matplotlib.use("agg")