Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -233,6 +233,7 @@ async def main(
|
|
233 |
# onnx_model = selected_model # Replace with the actual key for your ONNX model file
|
234 |
|
235 |
|
|
|
236 |
|
237 |
providers = ["CPUExecutionProvider"
|
238 |
if use_gpu is False
|
@@ -307,7 +308,7 @@ async def download_file(fileId: str):
|
|
307 |
else:
|
308 |
return {"error": "File not found"}
|
309 |
|
310 |
-
def load_onnx(model, sess_options, providers
|
311 |
_LOGGER.debug("Loading model from %s", model)
|
312 |
config = load_config(model)
|
313 |
model = onnxruntime.InferenceSession(
|
|
|
233 |
# onnx_model = selected_model # Replace with the actual key for your ONNX model file
|
234 |
|
235 |
|
236 |
+
# providers = [("CUDAExecutionProvider", {"cudnn_conv_use_max_workspace": '1'})]
|
237 |
|
238 |
providers = ["CPUExecutionProvider"
|
239 |
if use_gpu is False
|
|
|
308 |
else:
|
309 |
return {"error": "File not found"}
|
310 |
|
311 |
+
def load_onnx(model, sess_options, providers):
|
312 |
_LOGGER.debug("Loading model from %s", model)
|
313 |
config = load_config(model)
|
314 |
model = onnxruntime.InferenceSession(
|