rrevoid commited on
Commit
7ae919b
·
1 Parent(s): 0d84089

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,7 +30,7 @@ def predict(outputs):
30
  top = 0
31
  temp = 30000
32
  apr_probs = torch.nn.functional.softmax(torch.tensor([39253., 84., 220., 2263., 1214., 909., 66., 10661.]) / temp, dim=0)
33
- probs = nn.functional.softmax(outputs * apr_probs, dim=1).tolist()[0]
34
 
35
  top_cats = []
36
  top_probs = []
@@ -57,7 +57,7 @@ tokenizer = RobertaTokenizer.from_pretrained("roberta-large-mnli")
57
  model = init_model()
58
 
59
  st.title("Article classifier")
60
- st.markdown("<img width=500px src='https://lionbridge.ai/wp-content/uploads/2020/09/2020-09-08_text-classification-tools-services.jpg'>", unsafe_allow_html=True)
61
  st.markdown("### Title")
62
 
63
  title = st.text_area("*Enter title (required)", height=20)
 
30
  top = 0
31
  temp = 30000
32
  apr_probs = torch.nn.functional.softmax(torch.tensor([39253., 84., 220., 2263., 1214., 909., 66., 10661.]) / temp, dim=0)
33
+ probs = nn.functional.softmax(outputs / apr_probs, dim=1).tolist()[0]
34
 
35
  top_cats = []
36
  top_probs = []
 
57
  model = init_model()
58
 
59
  st.title("Article classifier")
60
+ st.markdown("<img width=500px src='https://lionbridge.ai/wp-content/uploads/2020/09/2020-09-08_text-classification-tools-services.jpg', class='center'>", unsafe_allow_html=True)
61
  st.markdown("### Title")
62
 
63
  title = st.text_area("*Enter title (required)", height=20)