Spaces:
Running
Running
Update app.py
Browse files
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.
|
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("
|
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"):
|