Spaces:
Runtime error
Runtime error
corrected error handling
Browse files
app.py
CHANGED
|
@@ -92,13 +92,13 @@ def button_click(hf_model_id, conv_template, quantization, oauth_token: gr.OAuth
|
|
| 92 |
convert_weight_result = subprocess.run(["mlc_llm convert_weight ./dist/models/" + model_dir_name + "/" + \
|
| 93 |
" --quantization " + quantization + \
|
| 94 |
" -o dist/" + mlc_model_name], shell=True, capture_output=True, text=True)
|
| 95 |
-
if convert_weight_result.
|
| 96 |
return convert_weight_result.stderr
|
| 97 |
|
| 98 |
gen_config_result = subprocess.run(["mlc_llm gen_config ./dist/models/" + model_dir_name + "/" + \
|
| 99 |
" --quantization " + quantization + " --conv-template " + conv_template + \
|
| 100 |
" -o dist/" + mlc_model_name + "/"], shell=True, capture_output=True, text=True)
|
| 101 |
-
if gen_config_result.
|
| 102 |
return gen_config_result.stderr
|
| 103 |
|
| 104 |
# push to HF
|
|
|
|
| 92 |
convert_weight_result = subprocess.run(["mlc_llm convert_weight ./dist/models/" + model_dir_name + "/" + \
|
| 93 |
" --quantization " + quantization + \
|
| 94 |
" -o dist/" + mlc_model_name], shell=True, capture_output=True, text=True)
|
| 95 |
+
if convert_weight_result.returncode != 0:
|
| 96 |
return convert_weight_result.stderr
|
| 97 |
|
| 98 |
gen_config_result = subprocess.run(["mlc_llm gen_config ./dist/models/" + model_dir_name + "/" + \
|
| 99 |
" --quantization " + quantization + " --conv-template " + conv_template + \
|
| 100 |
" -o dist/" + mlc_model_name + "/"], shell=True, capture_output=True, text=True)
|
| 101 |
+
if gen_config_result.returncode != 0:
|
| 102 |
return gen_config_result.stderr
|
| 103 |
|
| 104 |
# push to HF
|