Spaces:
Runtime error
Runtime error
Commit
·
de4024e
1
Parent(s):
437e1cc
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def load_model():
|
|
37 |
return DistilBertForSequenceClassification.from_pretrained('./')
|
38 |
|
39 |
def load_tokenizer():
|
40 |
-
return AutoTokenizer.from_pretrained(
|
41 |
|
42 |
def top_xx(preds, xx=95):
|
43 |
tops = torch.argsort(preds, 1, descending=True)
|
@@ -53,7 +53,7 @@ def top_xx(preds, xx=95):
|
|
53 |
|
54 |
model = load_model()
|
55 |
tokenizer = load_tokenizer()
|
56 |
-
temperature = 1
|
57 |
|
58 |
st.title('ArXivTaxonomizer© (original version)')
|
59 |
st.caption('If you are aware of any other public services which are illegally providing the ArXivTaxonomizer© functionality, please consider informing us.')
|
@@ -63,7 +63,7 @@ with st.form("Taxonomizer"):
|
|
63 |
title = st.text_area(label='Title', height=30)
|
64 |
abstract = st.text_area(label='Abstract (optional)', height=200)
|
65 |
xx = st.slider(label='Verbosity', min_value=1, max_value=99, value=95)
|
66 |
-
st.caption('Lower values will generate a few best guesses. Higher values will lead to a comprehensive list of topics that our model considers relevant. \nEmpirically, values arond
|
67 |
|
68 |
submitted = st.form_submit_button("Taxonomize")
|
69 |
st.caption('We **do not** recommend using ArXivTaxonomizer© to choose tags for you new paper.')
|
|
|
37 |
return DistilBertForSequenceClassification.from_pretrained('./')
|
38 |
|
39 |
def load_tokenizer():
|
40 |
+
return AutoTokenizer.from_pretrained('./')
|
41 |
|
42 |
def top_xx(preds, xx=95):
|
43 |
tops = torch.argsort(preds, 1, descending=True)
|
|
|
53 |
|
54 |
model = load_model()
|
55 |
tokenizer = load_tokenizer()
|
56 |
+
temperature = 1
|
57 |
|
58 |
st.title('ArXivTaxonomizer© (original version)')
|
59 |
st.caption('If you are aware of any other public services which are illegally providing the ArXivTaxonomizer© functionality, please consider informing us.')
|
|
|
63 |
title = st.text_area(label='Title', height=30)
|
64 |
abstract = st.text_area(label='Abstract (optional)', height=200)
|
65 |
xx = st.slider(label='Verbosity', min_value=1, max_value=99, value=95)
|
66 |
+
st.caption('Lower values will generate a few best guesses. Higher values will lead to a comprehensive list of topics that our model considers relevant. \nEmpirically, values arond 70 work best and generate a list of 3-5 guesses.')
|
67 |
|
68 |
submitted = st.form_submit_button("Taxonomize")
|
69 |
st.caption('We **do not** recommend using ArXivTaxonomizer© to choose tags for you new paper.')
|