Spaces:
Runtime error
Runtime error
add pythonic booleans
Browse files
app.py
CHANGED
@@ -177,9 +177,9 @@ def docgen_func(function_code, temp):
|
|
177 |
# Network can cause some overhead so it will be a soft limit.
|
178 |
},
|
179 |
"options": {
|
180 |
-
"use_gpu":
|
181 |
-
"use_cache":
|
182 |
-
"wait_for_model":
|
183 |
}
|
184 |
}
|
185 |
output = query(req_data)
|
|
|
177 |
# Network can cause some overhead so it will be a soft limit.
|
178 |
},
|
179 |
"options": {
|
180 |
+
"use_gpu": False, # (Default: false). Boolean to use GPU instead of CPU for inference (requires Startup plan at least)
|
181 |
+
"use_cache": True, # (Default: true). Boolean. There is a cache layer on the inference API to speedup requests we have already seen. Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). However if you use a non deterministic model, you can set this parameter to prevent the caching mechanism from being used resulting in a real new query.
|
182 |
+
"wait_for_model": False, # (Default: false) Boolean. If the model is not ready, wait for it instead of receiving 503. It limits the number of requests required to get your inference done. It is advised to only set this flag to true after receiving a 503 error as it will limit hanging in your application to known places.
|
183 |
}
|
184 |
}
|
185 |
output = query(req_data)
|