Spaces:
Sleeping
Sleeping
Muhammad Anas Akhtar
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,9 +5,6 @@ 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 |
-
"/f8d333a098d19b4fd9a8b18f94170487ad3f821d")
|
| 10 |
-
|
| 11 |
text_translator = pipeline("translation", model="facebook/nllb-200-distilled-600M",
|
| 12 |
torch_dtype=torch.bfloat16)
|
| 13 |
|
|
@@ -58,7 +55,7 @@ demo = gr.Interface(
|
|
| 58 |
gr.Dropdown(choices=available_languages, label="Select Destination Language")
|
| 59 |
],
|
| 60 |
outputs=[gr.Textbox(label="Translated text", lines=4)],
|
| 61 |
-
title="
|
| 62 |
description="This application translates English text to multiple languages. Select your desired target language from the dropdown menu."
|
| 63 |
)
|
| 64 |
|
|
|
|
| 5 |
# Use a pipeline as a high-level helper
|
| 6 |
from transformers import pipeline
|
| 7 |
|
|
|
|
|
|
|
|
|
|
| 8 |
text_translator = pipeline("translation", model="facebook/nllb-200-distilled-600M",
|
| 9 |
torch_dtype=torch.bfloat16)
|
| 10 |
|
|
|
|
| 55 |
gr.Dropdown(choices=available_languages, label="Select Destination Language")
|
| 56 |
],
|
| 57 |
outputs=[gr.Textbox(label="Translated text", lines=4)],
|
| 58 |
+
title="Multi Language Translator",
|
| 59 |
description="This application translates English text to multiple languages. Select your desired target language from the dropdown menu."
|
| 60 |
)
|
| 61 |
|