Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -115,7 +115,6 @@ async def logo():
|
|
115 |
return "Logo placeholder"
|
116 |
|
117 |
|
118 |
-
io = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")
|
119 |
lang_codes = list(flores_codes.keys())
|
120 |
#inputs = [gr.inputs.Radio(['nllb-distilled-600M', 'nllb-1.3B', 'nllb-distilled-1.3B'], label='NLLB Model'),
|
121 |
inputs = [gr.Dropdown(lang_codes, value='English', label='Source'),
|
@@ -136,7 +135,8 @@ examples = [
|
|
136 |
def translate_single(source_lang: str, target_lang: str, text: str) -> List[str]:
|
137 |
return translate_text([text], source_lang, target_lang)[0]
|
138 |
|
139 |
-
|
|
|
140 |
inputs,
|
141 |
outputs,
|
142 |
title=title,
|
|
|
115 |
return "Logo placeholder"
|
116 |
|
117 |
|
|
|
118 |
lang_codes = list(flores_codes.keys())
|
119 |
#inputs = [gr.inputs.Radio(['nllb-distilled-600M', 'nllb-1.3B', 'nllb-distilled-1.3B'], label='NLLB Model'),
|
120 |
inputs = [gr.Dropdown(lang_codes, value='English', label='Source'),
|
|
|
135 |
def translate_single(source_lang: str, target_lang: str, text: str) -> List[str]:
|
136 |
return translate_text([text], source_lang, target_lang)[0]
|
137 |
|
138 |
+
|
139 |
+
io = gr.Interface(translate_single,
|
140 |
inputs,
|
141 |
outputs,
|
142 |
title=title,
|