Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,8 @@ except RuntimeError:
|
|
| 16 |
# Load model and tokenizer
|
| 17 |
model_path = "app90/ChhattishgarhiAI_Model"
|
| 18 |
model = MBartForConditionalGeneration.from_pretrained(model_path)
|
| 19 |
-
tokenizer
|
|
|
|
| 20 |
|
| 21 |
# Translate Hindi → Chhattisgarhi
|
| 22 |
def translate_hindi_to_chhattisgarhi(text):
|
|
|
|
| 16 |
# Load model and tokenizer
|
| 17 |
model_path = "app90/ChhattishgarhiAI_Model"
|
| 18 |
model = MBartForConditionalGeneration.from_pretrained(model_path)
|
| 19 |
+
tokenizer.save_pretrained("app90/ChhattishgarhiAI_Model")
|
| 20 |
+
tokenizer = MBart50Tokenizer.from_pretrained(model_path, src_lang="hi_IN", tgt_lang="hne_IN")
|
| 21 |
|
| 22 |
# Translate Hindi → Chhattisgarhi
|
| 23 |
def translate_hindi_to_chhattisgarhi(text):
|