dipesh1701
commited on
Commit
·
d0c1414
1
Parent(s):
5c80f7d
fix: typo
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import os
|
|
2 |
import torch
|
3 |
import gradio as gr
|
4 |
import time
|
5 |
-
from transformers import AutoTokenizer,
|
6 |
from flores200_codes import flores_codes
|
7 |
|
8 |
|
@@ -20,7 +20,7 @@ def load_models():
|
|
20 |
|
21 |
for call_name, real_name in model_name_dict.items():
|
22 |
print("\tLoading model: %s" % call_name)
|
23 |
-
model =
|
24 |
tokenizer = AutoTokenizer.from_pretrained(real_name)
|
25 |
model_dict[call_name + "_model"] = model
|
26 |
model_dict[call_name + "_tokenizer"] = tokenizer
|
|
|
2 |
import torch
|
3 |
import gradio as gr
|
4 |
import time
|
5 |
+
from transformers import AutoTokenizer, AutoModel, pipeline
|
6 |
from flores200_codes import flores_codes
|
7 |
|
8 |
|
|
|
20 |
|
21 |
for call_name, real_name in model_name_dict.items():
|
22 |
print("\tLoading model: %s" % call_name)
|
23 |
+
model = AutoModel.from_pretrained(real_name)
|
24 |
tokenizer = AutoTokenizer.from_pretrained(real_name)
|
25 |
model_dict[call_name + "_model"] = model
|
26 |
model_dict[call_name + "_tokenizer"] = tokenizer
|