with gradio load fun
Browse files
app.py
CHANGED
|
@@ -6,9 +6,16 @@ import gradio as gr
|
|
| 6 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
#iface.launch()
|
| 8 |
|
| 9 |
-
from transformers import pipeline
|
| 10 |
|
| 11 |
-
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es")
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
demo.launch()
|
|
|
|
| 6 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
#iface.launch()
|
| 8 |
|
|
|
|
| 9 |
|
|
|
|
| 10 |
|
| 11 |
+
#from transformers import pipeline
|
| 12 |
+
|
| 13 |
+
#pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es")
|
| 14 |
+
|
| 15 |
+
#demo = gr.Interface.from_pipeline(pipe)
|
| 16 |
+
#demo.launch()
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
demo = gr.load("Helsinki-NLP/opus-mt-en-es", src="models")
|
| 20 |
+
|
| 21 |
demo.launch()
|