Akeb0n0 commited on
Commit
0ae5cd0
·
verified ·
1 Parent(s): 431d797

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ def load_model():
26
 
27
  return model, tokenizer, idx_to_category
28
 
29
- def predict(title, abstract, model, tokenizer, idx_to_category, threshold=0.97):
30
  text = f"{title} /n {abstract}" if abstract else title
31
  inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
32
 
@@ -54,7 +54,7 @@ def predict(title, abstract, model, tokenizer, idx_to_category, threshold=0.97):
54
  def main():
55
  model, tokenizer, idx_to_category = load_model()
56
 
57
- st.title("arXiv Article Classifier")
58
  st.markdown("Определение тематики научных статей по названию и аннотации")
59
 
60
  with st.form("input_form"):
 
26
 
27
  return model, tokenizer, idx_to_category
28
 
29
+ def predict(title, abstract, model, tokenizer, idx_to_category, threshold=0.95):
30
  text = f"{title} /n {abstract}" if abstract else title
31
  inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
32
 
 
54
  def main():
55
  model, tokenizer, idx_to_category = load_model()
56
 
57
+ st.title("Классификатор статей")
58
  st.markdown("Определение тематики научных статей по названию и аннотации")
59
 
60
  with st.form("input_form"):