Spaces:
Runtime error
Runtime error
ADD: Second model as well as info card about training subsets
Browse files
app.py
CHANGED
|
@@ -30,12 +30,14 @@ def main():
|
|
| 30 |
st.text("")
|
| 31 |
models_to_choose = [
|
| 32 |
"AryanLala/autonlp-Scientific_Title_Generator-34558227",
|
|
|
|
| 33 |
]
|
| 34 |
|
| 35 |
BASE_MODEL = st.selectbox("Choose a model to generate the title", models_to_choose)
|
| 36 |
|
| 37 |
def preprocess(text):
|
| 38 |
-
if BASE_MODEL == "AryanLala/autonlp-Scientific_Title_Generator-34558227"
|
|
|
|
| 39 |
return [text]
|
| 40 |
else:
|
| 41 |
st.error("Please select a model first")
|
|
@@ -84,7 +86,24 @@ def main():
|
|
| 84 |
if st.button("Submit"):
|
| 85 |
submit(message)
|
| 86 |
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
if __name__ == "__main__":
|
| 90 |
main()
|
|
|
|
| 30 |
st.text("")
|
| 31 |
models_to_choose = [
|
| 32 |
"AryanLala/autonlp-Scientific_Title_Generator-34558227",
|
| 33 |
+
"shamikbose89/mt5-small-finetuned-arxiv-cs-finetuned-arxiv-cs-full"
|
| 34 |
]
|
| 35 |
|
| 36 |
BASE_MODEL = st.selectbox("Choose a model to generate the title", models_to_choose)
|
| 37 |
|
| 38 |
def preprocess(text):
|
| 39 |
+
if ((BASE_MODEL == "AryanLala/autonlp-Scientific_Title_Generator-34558227") |
|
| 40 |
+
(BASE_MODEL == "shamikbose89/mt5-small-finetuned-arxiv-cs-finetuned-arxiv-cs-full")):
|
| 41 |
return [text]
|
| 42 |
else:
|
| 43 |
st.error("Please select a model first")
|
|
|
|
| 86 |
if st.button("Submit"):
|
| 87 |
submit(message)
|
| 88 |
|
| 89 |
+
with st.expander("Additional Model Info"):
|
| 90 |
+
st.write("""
|
| 91 |
+
The models used were fine-tuned on subset of data from the [Arxiv Dataset](https://huggingface.co/datasets/arxiv_dataset)
|
| 92 |
+
The task of the models is to suggest an appropraite title from the abstract of a scientific paper.
|
| 93 |
+
|
| 94 |
+
The model [AryanLala/autonlp-Scientific_Title_Generator-34558227]() was trained on data
|
| 95 |
+
from the Cs.AI (Artificial Intelligence) category of papers.
|
| 96 |
+
|
| 97 |
+
The model [shamikbose89/mt5-small-finetuned-arxiv-cs-finetuned-arxiv-cs-full](https://huggingface.co/shamikbose89/mt5-small-finetuned-arxiv-cs-finetuned-arxiv-cs-full)
|
| 98 |
+
was trained on the categories: cs.AI, cs.LG, cs.NI, cs.GR cs.CL, cs.CV (Artificial Intelligence, Machine Learning, Networking and Internet Architecture, Graphics, Computation and Language, Computer Vision and Pattern Recognition)
|
| 99 |
+
""")
|
| 100 |
+
|
| 101 |
+
st.text('')
|
| 102 |
+
st.markdown(
|
| 103 |
+
'''<span style="color:blue; font-size:10px">App created by [@AlekseyDorkin](https://huggingface.co/AlekseyDorkin)
|
| 104 |
+
and [@akshay7](https://huggingface.co/akshay7)</span>''',
|
| 105 |
+
unsafe_allow_html=True,
|
| 106 |
+
)
|
| 107 |
|
| 108 |
if __name__ == "__main__":
|
| 109 |
main()
|