Spaces:
Runtime error
Runtime error
Commit
·
4a4d60e
1
Parent(s):
dca1f1d
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,16 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es")
|
| 6 |
-
|
| 7 |
-
def predict(text):
|
| 8 |
-
return pipe(text)[0]["translation_text"]
|
| 9 |
-
|
| 10 |
-
demo = gr.Interface(
|
| 11 |
-
fn=predict,
|
| 12 |
-
inputs='text',
|
| 13 |
-
outputs='text',
|
| 14 |
-
)
|
| 15 |
|
| 16 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
demo = gr.load("models/google/flan-t5-xxl", src="models")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
demo.launch()
|