ritampatra commited on
Commit
be4356b
·
verified ·
1 Parent(s): bd83eff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -1,13 +1,8 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
- # Caching the model to avoid reloading it multiple times
5
- @st.cache_resource
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 = {