Spaces:
Runtime error
Runtime error
Update app.py
#1
by prograk - opened
app.py
CHANGED
|
@@ -5,14 +5,14 @@ import json
|
|
| 5 |
# Use a pipeline as a high-level helper
|
| 6 |
from transformers import pipeline
|
| 7 |
|
| 8 |
-
model_path= ("../Models/models--facebook--nllb-200-distilled-600M/snapshots"
|
| 9 |
-
|
| 10 |
|
| 11 |
-
text_translator = pipeline("translation", model="facebook/nllb-200-distilled-600M",
|
| 12 |
-
torch_dtype=torch.bfloat16)
|
| 13 |
-
|
| 14 |
-
# text_translator = pipeline("translation", model=model_path,
|
| 15 |
# torch_dtype=torch.bfloat16)
|
|
|
|
|
|
|
|
|
|
| 16 |
# Load the JSON data from the file
|
| 17 |
with open('language.json', 'r') as file:
|
| 18 |
language_data = json.load(file)
|
|
|
|
| 5 |
# Use a pipeline as a high-level helper
|
| 6 |
from transformers import pipeline
|
| 7 |
|
| 8 |
+
# model_path= ("../Models/models--facebook--nllb-200-distilled-600M/snapshots"
|
| 9 |
+
# "/f8d333a098d19b4fd9a8b18f94170487ad3f821d")
|
| 10 |
|
| 11 |
+
# text_translator = pipeline("translation", model="facebook/nllb-200-distilled-600M",
|
|
|
|
|
|
|
|
|
|
| 12 |
# torch_dtype=torch.bfloat16)
|
| 13 |
+
|
| 14 |
+
text_translator = pipeline("translation", model=model_path,
|
| 15 |
+
torch_dtype=torch.bfloat16)
|
| 16 |
# Load the JSON data from the file
|
| 17 |
with open('language.json', 'r') as file:
|
| 18 |
language_data = json.load(file)
|