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