Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,8 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
def load_model():
|
| 7 |
-
return pipeline("translation", model="facebook/mbart-large-50-many-to-many-mmt")
|
| 8 |
-
|
| 9 |
-
# Load the translation pipeline
|
| 10 |
-
pipe = load_model()
|
| 11 |
|
| 12 |
# Define language codes
|
| 13 |
language_codes = {
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
# Load the translation pipeline with the specified model
|
| 5 |
+
pipe = pipeline("translation", model="facebook/mbart-large-50-many-to-many-mmt")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# Define language codes
|
| 8 |
language_codes = {
|