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:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("openpecha/aligner") model = AutoModelForSeq2SeqLM.from_pretrained("openpecha/aligner") - Notebooks
- Google Colab
- Kaggle
Update handler.py
Browse files- handler.py +8 -0
handler.py
CHANGED
|
@@ -161,8 +161,16 @@ def get_github_dev_url(raw_github_url: str) -> str:
|
|
| 161 |
def add_input_in_readme(input_dict: Dict[str, str], path: Path) -> Path:
|
| 162 |
input_readme_fn = path / "README.md"
|
| 163 |
text_id = input_dict["text_id"]
|
|
|
|
|
|
|
| 164 |
bo_file_url = get_github_dev_url(input_dict["bo_file_url"])
|
| 165 |
en_file_url = get_github_dev_url(input_dict["en_file_url"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
input_string = "## Input\n- [BO{}]({})\n- [EN{}]({})".format(
|
| 167 |
text_id, bo_file_url, text_id, en_file_url
|
| 168 |
)
|
|
|
|
| 161 |
def add_input_in_readme(input_dict: Dict[str, str], path: Path) -> Path:
|
| 162 |
input_readme_fn = path / "README.md"
|
| 163 |
text_id = input_dict["text_id"]
|
| 164 |
+
|
| 165 |
+
|
| 166 |
bo_file_url = get_github_dev_url(input_dict["bo_file_url"])
|
| 167 |
en_file_url = get_github_dev_url(input_dict["en_file_url"])
|
| 168 |
+
bo_file_url=os.path.split(bo_file_url)
|
| 169 |
+
bo_file_url=os.path.join("https://github.com/MonlamAI/",str(text_id).replace("TM","BO"))
|
| 170 |
+
en_file_url=os.path.split(en_file_url)
|
| 171 |
+
en_file_url=os.path.join("https://github.com/MonlamAI/",str(text_id).replace("TM","EN"))
|
| 172 |
+
print(bo_file_url,en_file_url)
|
| 173 |
+
|
| 174 |
input_string = "## Input\n- [BO{}]({})\n- [EN{}]({})".format(
|
| 175 |
text_id, bo_file_url, text_id, en_file_url
|
| 176 |
)
|