Instructions to use openpecha/aligner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openpecha/aligner with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("openpecha/aligner") model = AutoModelForSeq2SeqLM.from_pretrained("openpecha/aligner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update handler.py
Browse files- handler.py +1 -0
handler.py
CHANGED
|
@@ -249,6 +249,7 @@ def _run_align_script(bo_fn, en_fn, output_dir):
|
|
| 249 |
text=True,
|
| 250 |
cwd=str(ALIGNER_SCRIPT_DIR),
|
| 251 |
)
|
|
|
|
| 252 |
output_fn = re.search(r"\[OUTPUT\] (.*)", output.stdout).group(1)
|
| 253 |
output_fn = "/" + output_fn.split("//")[-1]
|
| 254 |
end = time.time()
|
|
|
|
| 249 |
text=True,
|
| 250 |
cwd=str(ALIGNER_SCRIPT_DIR),
|
| 251 |
)
|
| 252 |
+
logging.info(f"Content length of output: {output.stdout} characters")
|
| 253 |
output_fn = re.search(r"\[OUTPUT\] (.*)", output.stdout).group(1)
|
| 254 |
output_fn = "/" + output_fn.split("//")[-1]
|
| 255 |
end = time.time()
|