Spaces:
Running
Running
alessandro trinca tornidor
commited on
Commit
•
c6839af
1
Parent(s):
91d57a8
feat: use new optional argument inference_decorator=spaces.GPU for lisa.lisa_predict()
Browse files
app.py
CHANGED
@@ -142,7 +142,8 @@ def infer_lisa_gradio(request_input: StringPromptApiRequestBody) -> str:
|
|
142 |
gpu_initialization()
|
143 |
output = lisa.lisa_predict(
|
144 |
bbox=body_request["bbox"], prompt=body_request["prompt"], zoom=body_request["zoom"],
|
145 |
-
source=source, source_name=source_name, inference_function_name_key=LISA_INFERENCE_FN
|
|
|
146 |
)
|
147 |
duration_run = time.time() - time_start_run
|
148 |
app_logger.info(f"duration_run:{duration_run}.")
|
|
|
142 |
gpu_initialization()
|
143 |
output = lisa.lisa_predict(
|
144 |
bbox=body_request["bbox"], prompt=body_request["prompt"], zoom=body_request["zoom"],
|
145 |
+
source=source, source_name=source_name, inference_function_name_key=LISA_INFERENCE_FN,
|
146 |
+
inference_decorator=spaces.GPU
|
147 |
)
|
148 |
duration_run = time.time() - time_start_run
|
149 |
app_logger.info(f"duration_run:{duration_run}.")
|