Spaces:
Sleeping
Sleeping
breadlicker45
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import MBartForConditionalGeneration,
|
3 |
import torch
|
4 |
|
5 |
# Load the model and tokenizer
|
6 |
model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-50-many-to-many-mmt")
|
7 |
-
tokenizer =
|
8 |
|
9 |
# Define the language codes supported by the model
|
10 |
language_codes = {
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import MBartForConditionalGeneration, MBartTokenizer
|
3 |
import torch
|
4 |
|
5 |
# Load the model and tokenizer
|
6 |
model = MBartForConditionalGeneration.from_pretrained("facebook/mbart-large-50-many-to-many-mmt")
|
7 |
+
tokenizer = MBartTokenizer.from_pretrained("facebook/mbart-large-50-many-to-many-mmt")
|
8 |
|
9 |
# Define the language codes supported by the model
|
10 |
language_codes = {
|