Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,16 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
from transformers import pipeline
|
|
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
def predict(text):
|
8 |
-
return pipe(text)[0]["translation_text"]
|
9 |
-
|
10 |
-
iface = gr.Interface(
|
11 |
-
fn=predict,
|
12 |
-
inputs='text',
|
13 |
-
outputs='text',
|
14 |
examples=[["Hello! My name is Omar"]]
|
15 |
)
|
16 |
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
from transformers import pipeline
|
4 |
+
import gradio as gr
|
5 |
|
6 |
+
iface = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-en-es",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
examples=[["Hello! My name is Omar"]]
|
8 |
)
|
9 |
|