Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
-
pipe = pipeline(model="Helsinki-NLP/opus-mt-en-es")
|
|
|
|
|
|
|
| 5 |
|
| 6 |
demo = gr.Interface.from_pipeline(pipe)
|
| 7 |
demo.launch()
|
|
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
pipe = pipeline("text2text-generation", model="Helsinki-NLP/opus-mt-en-es")
|
| 5 |
+
result = pipe("Hello, how are you?")
|
| 6 |
+
print(result)
|
| 7 |
|
| 8 |
demo = gr.Interface.from_pipeline(pipe)
|
| 9 |
demo.launch()
|