Spaces:
Running
Running
alessandro trinca tornidor
commited on
Commit
•
2c0bc3f
1
Parent(s):
9813432
feat: change gradio url to /
Browse files
app.py
CHANGED
@@ -22,10 +22,10 @@ from samgis_lisa_on_zero.utilities.type_hints import ApiRequestBody, StringPromp
|
|
22 |
loglevel = os.getenv('LOGLEVEL', 'INFO').upper()
|
23 |
app_logger = setup_logging(debug=loglevel)
|
24 |
|
25 |
-
CUSTOM_INDEX_URL = os.getenv("CUSTOM_INDEX_URL", "/")
|
26 |
CUSTOM_SAMGIS_URL = os.getenv("CUSTOM_SAMGIS_URL", "/samgis")
|
27 |
CUSTOM_LISA_URL = os.getenv("CUSTOM_LISA_URL", "/lisa")
|
28 |
-
CUSTOM_GRADIO_URL = os.getenv("CUSTOM_GRADIO_URL", "/
|
29 |
FASTAPI_TITLE = "samgis-lisa-on-zero"
|
30 |
app = FastAPI(title=FASTAPI_TITLE, version="1.0")
|
31 |
|
@@ -288,6 +288,7 @@ app.mount(CUSTOM_INDEX_URL, StaticFiles(directory=static_dist_folder, html=True)
|
|
288 |
async def index() -> FileResponse:
|
289 |
return FileResponse(path=static_dist_folder / "index.html", media_type="text/html")
|
290 |
|
|
|
291 |
args = app_helpers.parse_args([])
|
292 |
app_helpers.app_logger.info(f"prepared default arguments:{args}.")
|
293 |
inference_fn = app_helpers.get_inference_model_by_args(args, inference_decorator=SPACES_GPU)
|
|
|
22 |
loglevel = os.getenv('LOGLEVEL', 'INFO').upper()
|
23 |
app_logger = setup_logging(debug=loglevel)
|
24 |
|
25 |
+
CUSTOM_INDEX_URL = os.getenv("CUSTOM_INDEX_URL", "/static")
|
26 |
CUSTOM_SAMGIS_URL = os.getenv("CUSTOM_SAMGIS_URL", "/samgis")
|
27 |
CUSTOM_LISA_URL = os.getenv("CUSTOM_LISA_URL", "/lisa")
|
28 |
+
CUSTOM_GRADIO_URL = os.getenv("CUSTOM_GRADIO_URL", "/")
|
29 |
FASTAPI_TITLE = "samgis-lisa-on-zero"
|
30 |
app = FastAPI(title=FASTAPI_TITLE, version="1.0")
|
31 |
|
|
|
288 |
async def index() -> FileResponse:
|
289 |
return FileResponse(path=static_dist_folder / "index.html", media_type="text/html")
|
290 |
|
291 |
+
|
292 |
args = app_helpers.parse_args([])
|
293 |
app_helpers.app_logger.info(f"prepared default arguments:{args}.")
|
294 |
inference_fn = app_helpers.get_inference_model_by_args(args, inference_decorator=SPACES_GPU)
|