Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
43b3fba
1
Parent(s):
2e1c27e
app.py
CHANGED
@@ -292,7 +292,7 @@ All outputs generated are synthetic, created using fine-tuned models for experim
|
|
292 |
gr.Markdown("Select a translation direction and enter text to translate between Dhivehi, English and Latin script.")
|
293 |
# Set up initial choices and examples based on default model
|
294 |
default_model = list(MODEL_OPTIONS_TRANSLATE.keys())[0]
|
295 |
-
if "
|
296 |
initial_choices = ["2dv", "2en"]
|
297 |
initial_value = "2dv"
|
298 |
else:
|
@@ -337,7 +337,7 @@ All outputs generated are synthetic, created using fine-tuned models for experim
|
|
337 |
)
|
338 |
|
339 |
def update_choices(model_name):
|
340 |
-
if "
|
341 |
return gr.update(choices=["2dv", "2en"], value="2dv")
|
342 |
else:
|
343 |
return gr.update(choices=["en2dv:", "dv2en:", "dv2latin:", "latin2dv:"], value="en2dv:")
|
|
|
292 |
gr.Markdown("Select a translation direction and enter text to translate between Dhivehi, English and Latin script.")
|
293 |
# Set up initial choices and examples based on default model
|
294 |
default_model = list(MODEL_OPTIONS_TRANSLATE.keys())[0]
|
295 |
+
if default_model.startswith("MT"):
|
296 |
initial_choices = ["2dv", "2en"]
|
297 |
initial_value = "2dv"
|
298 |
else:
|
|
|
337 |
)
|
338 |
|
339 |
def update_choices(model_name):
|
340 |
+
if model_name.startswith("MT"):
|
341 |
return gr.update(choices=["2dv", "2en"], value="2dv")
|
342 |
else:
|
343 |
return gr.update(choices=["en2dv:", "dv2en:", "dv2latin:", "latin2dv:"], value="en2dv:")
|