aletrn John6666 commited on
Commit
a04574a
·
verified ·
1 Parent(s): fbac074

Upload app.py (#2)

Browse files

- Upload app.py (32c3e2de399c6453ae014030547f6ec80cf38371)


Co-authored-by: John Smith <[email protected]>

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -55,7 +55,7 @@ async def request_middleware(request, call_next):
55
 
56
  return await logging_middleware(request, call_next)
57
 
58
- @spaces.GPU
59
  def gpu_initialization() -> None:
60
  app_logger.info("GPU initialization...")
61
 
@@ -120,6 +120,7 @@ async def health() -> JSONResponse:
120
  return JSONResponse(status_code=200, content={"msg": "still alive..."})
121
 
122
 
 
123
  def infer_lisa_gradio(request_input: StringPromptApiRequestBody) -> str:
124
  from samgis_lisa.io_package.wrappers_helpers import get_parsed_bbox_points_with_string_prompt
125
  from samgis_lisa.prediction_api import lisa
 
55
 
56
  return await logging_middleware(request, call_next)
57
 
58
+ #@spaces.GPU
59
  def gpu_initialization() -> None:
60
  app_logger.info("GPU initialization...")
61
 
 
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