ilyshi commited on
Commit
3286385
1 Parent(s): 823f354
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -43,7 +43,7 @@ def model_init():
43
  map_location=torch.device("cpu")
44
  )
45
  )
46
- return model
47
 
48
  # MAIN
49
  from PIL import Image
@@ -63,7 +63,6 @@ st.markdown("### Article Abstract")
63
  text2 = st.text_area("Введите описание статьи", height=200)
64
  common_text = text1 + text2
65
  if common_text != "":
66
- model = model_init()
67
  make_prediction(common_text)
68
 
69
-
43
  map_location=torch.device("cpu")
44
  )
45
  )
46
+ return tokenizer, model
47
 
48
  # MAIN
49
  from PIL import Image
63
  text2 = st.text_area("Введите описание статьи", height=200)
64
  common_text = text1 + text2
65
  if common_text != "":
66
+ tokenizer, model = model_init()
67
  make_prediction(common_text)
68