Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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(
|
7 |
-
results = translation_pipeline(
|
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,
|