Skip to content

Commit

Permalink
cli fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ameen-91 committed Nov 29, 2024
1 parent 2dc0cef commit acc9fcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions infero/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

@app.command("run")
def run(model: str, quantize: bool = False):
convert_to_onnx(model)
if quantize:
convert_to_onnx_q8(model)
if check_model(model):
model_path = os.path.join(get_models_dir(), sanitize_model_name(model))
package_dir = get_package_dir()
Expand All @@ -31,9 +34,6 @@ def run(model: str, quantize: bool = False):
@app.command("pull")
def pull(model: str, quantize: bool = False):
if pull_model(model):
convert_to_onnx(model)
if quantize:
convert_to_onnx_q8(model)
print_success_bold(f"Model {model} pulled successfully")
else:
print_error("Failed to get model")
Expand Down

0 comments on commit acc9fcd

Please sign in to comment.