Spaces:
Sleeping
Sleeping
Nazarshia2889
commited on
Commit
·
523e667
1
Parent(s):
2b5fc44
model updates
Browse files- .DS_Store +0 -0
- app.py +15 -3
- bcell/.DS_Store +0 -0
- bcell/tf_model.h5 +1 -1
- classifier/.DS_Store +0 -0
- classifier2/.DS_Store +0 -0
.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
app.py
CHANGED
@@ -21,12 +21,22 @@ model_checkpoint = "facebook/esm2_t6_8M_UR50D"
|
|
21 |
|
22 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
23 |
|
|
|
24 |
if model_type == 'Linear T-Cells (MHC Class I Restriction)':
|
25 |
-
|
|
|
|
|
|
|
26 |
elif model_type == 'Linear T-Cells (MHC Class II Restriction)':
|
27 |
-
|
|
|
|
|
|
|
28 |
elif model_type == 'Linear B-Cell':
|
29 |
-
|
|
|
|
|
|
|
30 |
# submit button
|
31 |
if st.button('Submit'):
|
32 |
locations = []
|
@@ -58,3 +68,5 @@ if st.button('Submit'):
|
|
58 |
return f'background-color: rgb({r}, {g}, {b})'
|
59 |
|
60 |
st.table(locations.style.applymap(color_survived, subset=['Probability']))
|
|
|
|
|
|
21 |
|
22 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
23 |
|
24 |
+
# try:
|
25 |
if model_type == 'Linear T-Cells (MHC Class I Restriction)':
|
26 |
+
try:
|
27 |
+
model = TFAutoModelForSequenceClassification.from_pretrained('classifier')
|
28 |
+
except tf.errors.InvalidArgumentError:
|
29 |
+
st.warning("We're experiencing server issues. Please try again later!", icon="⚠️")
|
30 |
elif model_type == 'Linear T-Cells (MHC Class II Restriction)':
|
31 |
+
try:
|
32 |
+
model = TFAutoModelForSequenceClassification.from_pretrained('classifier2')
|
33 |
+
except tf.errors.InvalidArgumentError:
|
34 |
+
st.warning("We're experiencing server issues. Please try again later!", icon="⚠️")
|
35 |
elif model_type == 'Linear B-Cell':
|
36 |
+
try:
|
37 |
+
model = TFAutoModelForSequenceClassification.from_pretrained('bcell')
|
38 |
+
except tf.errors.InvalidArgumentError:
|
39 |
+
st.warning("We're experiencing server issues. Please try again later!", icon="⚠️")
|
40 |
# submit button
|
41 |
if st.button('Submit'):
|
42 |
locations = []
|
|
|
68 |
return f'background-color: rgb({r}, {g}, {b})'
|
69 |
|
70 |
st.table(locations.style.applymap(color_survived, subset=['Probability']))
|
71 |
+
# except InvalidArgumentError:
|
72 |
+
# st.warning("We're experiencing server issues. Please try again later!", icon="⚠️")
|
bcell/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
bcell/tf_model.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 30211508
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fc764936c96b97e3e5678e26e08f8e96eb7a1effaabc4b8cc1173471f0c3eb5d
|
3 |
size 30211508
|
classifier/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
classifier2/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|