Spaces:
Running
Running
alessandro trinca tornidor
commited on
Commit
•
8f287b5
1
Parent(s):
a04574a
feat: try without gpu_initialization() execution
Browse files
app.py
CHANGED
@@ -120,7 +120,7 @@ async def health() -> JSONResponse:
|
|
120 |
return JSONResponse(status_code=200, content={"msg": "still alive..."})
|
121 |
|
122 |
|
123 |
-
@spaces.GPU
|
124 |
def infer_lisa_gradio(request_input: StringPromptApiRequestBody) -> str:
|
125 |
from samgis_lisa.io_package.wrappers_helpers import get_parsed_bbox_points_with_string_prompt
|
126 |
from samgis_lisa.prediction_api import lisa
|
@@ -140,7 +140,7 @@ def infer_lisa_gradio(request_input: StringPromptApiRequestBody) -> str:
|
|
140 |
app_logger.debug(f"body_request:type(source):{type(source)}, source:{source}.")
|
141 |
app_logger.debug(f"body_request:type(source_name):{type(source_name)}, source_name:{source_name}.")
|
142 |
app_logger.debug(f"lisa module:{lisa}.")
|
143 |
-
gpu_initialization()
|
144 |
output = lisa.lisa_predict(
|
145 |
bbox=body_request["bbox"], prompt=body_request["prompt"], zoom=body_request["zoom"],
|
146 |
source=source, source_name=source_name, inference_function_name_key=LISA_INFERENCE_FN,
|
|
|
120 |
return JSONResponse(status_code=200, content={"msg": "still alive..."})
|
121 |
|
122 |
|
123 |
+
# @spaces.GPU
|
124 |
def infer_lisa_gradio(request_input: StringPromptApiRequestBody) -> str:
|
125 |
from samgis_lisa.io_package.wrappers_helpers import get_parsed_bbox_points_with_string_prompt
|
126 |
from samgis_lisa.prediction_api import lisa
|
|
|
140 |
app_logger.debug(f"body_request:type(source):{type(source)}, source:{source}.")
|
141 |
app_logger.debug(f"body_request:type(source_name):{type(source_name)}, source_name:{source_name}.")
|
142 |
app_logger.debug(f"lisa module:{lisa}.")
|
143 |
+
# gpu_initialization()
|
144 |
output = lisa.lisa_predict(
|
145 |
bbox=body_request["bbox"], prompt=body_request["prompt"], zoom=body_request["zoom"],
|
146 |
source=source, source_name=source_name, inference_function_name_key=LISA_INFERENCE_FN,
|