Spaces:
Running
Running
Update index.html
Browse files- index.html +2 -4
index.html
CHANGED
@@ -33,11 +33,9 @@ import gradio as gr
|
|
33 |
transformers = await import_transformers_js()
|
34 |
pipeline = transformers.pipeline
|
35 |
pipe = await pipeline('translation', 'Xenova/t5-small')
|
36 |
-
|
37 |
async def generate(text):
|
38 |
-
return await pipe(text,
|
39 |
-
src_lang = "en",
|
40 |
-
tgt_lang = "fr",)
|
41 |
|
42 |
demo = gr.Interface(
|
43 |
generate,
|
|
|
33 |
transformers = await import_transformers_js()
|
34 |
pipeline = transformers.pipeline
|
35 |
pipe = await pipeline('translation', 'Xenova/t5-small')
|
36 |
+
pipeline.task = "translation_en_to_fr"
|
37 |
async def generate(text):
|
38 |
+
return await pipe(text,)
|
|
|
|
|
39 |
|
40 |
demo = gr.Interface(
|
41 |
generate,
|