Mds21 commited on
Commit
04be83b
1 Parent(s): 8d26a27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
  translation_pipeline = pipeline('translation_en_to_de')
4
- results = translation_pipeline('I love ice cream')
5
- results[0]['translation_text']
6
- def translate_transformers(from_text):
7
- results = translation_pipeline(from_text)
8
  return results[0]['translation_text']
9
 
10
  interface = gr.Interface(fn=translate_transformers,
 
1
  import gradio as gr
2
  from transformers import pipeline
3
  translation_pipeline = pipeline('translation_en_to_de')
4
+ # results = translation_pipeline('I love ice cream')
5
+ # results[0]['translation_text']
6
+ def translate_transformers(English):
7
+ results = translation_pipeline(English)
8
  return results[0]['translation_text']
9
 
10
  interface = gr.Interface(fn=translate_transformers,