ilyshi commited on
Commit
51ce1a0
1 Parent(s): f401857

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,6 +31,7 @@ def make_prediction(text):
31
 
32
  tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
33
 
 
34
  model = AutoModelForSequenceClassification.from_pretrained("distilbert-base-uncased", num_labels=8)
35
  model_name = "trained_model2"
36
  model_path = model_name + '.zip'
@@ -49,12 +50,11 @@ st.markdown("<img src='https://centroderecursosmarista.org/wp-content/uploads/20
49
  st.markdown(" ")
50
 
51
  st.markdown("### Article Title")
52
- text = st.text_area("Введите название статьи", height=400)
53
 
54
  st.markdown("### Article Abstract")
55
  text = st.text_area("Введите описание статьи", height=400)
56
 
57
-
58
-
59
  make_prediction(text)
60
 
 
31
 
32
  tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
33
 
34
+ @st.cache
35
  model = AutoModelForSequenceClassification.from_pretrained("distilbert-base-uncased", num_labels=8)
36
  model_name = "trained_model2"
37
  model_path = model_name + '.zip'
 
50
  st.markdown(" ")
51
 
52
  st.markdown("### Article Title")
53
+ text = st.text_area("Введите название статьи", height=50)
54
 
55
  st.markdown("### Article Abstract")
56
  text = st.text_area("Введите описание статьи", height=400)
57
 
58
+ @st.cache
 
59
  make_prediction(text)
60