reach-vb HF staff commited on
Commit
679df31
1 Parent(s): c2dbf6d

Update index.html

Browse files
Files changed (1) hide show
  1. 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,