Update app.py
Browse files
app.py
CHANGED
|
@@ -16,14 +16,14 @@ tokenizer = AutoTokenizer.from_pretrained(model_checkpoint1)
|
|
| 16 |
class MyModel(nn.Module):
|
| 17 |
def __init__(self):
|
| 18 |
super().__init__()
|
| 19 |
-
self.bert1 = EsmForSequenceClassification.from_pretrained(model_checkpoint1, num_labels=
|
| 20 |
# for param in self.bert1.parameters():
|
| 21 |
# param.requires_grad = False
|
| 22 |
self.bn1 = nn.BatchNorm1d(256)
|
| 23 |
self.bn2 = nn.BatchNorm1d(128)
|
| 24 |
self.bn3 = nn.BatchNorm1d(64)
|
| 25 |
self.relu = nn.LeakyReLU()
|
| 26 |
-
self.fc1 = nn.Linear(
|
| 27 |
self.fc2 = nn.Linear(256, 128)
|
| 28 |
self.fc3 = nn.Linear(128, 64)
|
| 29 |
self.output_layer = nn.Linear(64, 2)
|
|
@@ -96,7 +96,7 @@ if __name__ == "__main__":
|
|
| 96 |
"<p align='center' style='font-size: 20px;'>🔥Welcome to Antimicrobial Peptide Recognition Model. See our <a href='https://github.com/wrab12/diff-amp'>Project</a></p>")
|
| 97 |
gr.HTML(
|
| 98 |
'''<center>
|
| 99 |
-
<a href="https://huggingface.co/spaces/jackrui/
|
| 100 |
<img src="https://bit.ly/3gLdBN6" alt="Duplicate Space">
|
| 101 |
</a>
|
| 102 |
</center>''')
|
|
@@ -131,7 +131,7 @@ if __name__ == "__main__":
|
|
| 131 |
gr.Markdown(
|
| 132 |
"<p align='center'><img src='https://pic4.zhimg.com/v2-eb2a7c0e746e67d1768090eec74f6787_b.jpg'></p>")
|
| 133 |
gr.Markdown(
|
| 134 |
-
"<p align='center' style='font-size: 20px;'>Related job links in the same series: <a href='https://huggingface.co/spaces/jackrui/
|
| 135 |
gr.Markdown('''📝 **Citation**
|
| 136 |
If our work is useful for your research, please consider citing:
|
| 137 |
```
|
|
@@ -158,8 +158,7 @@ td {
|
|
| 158 |
|
| 159 |
</tr>
|
| 160 |
</table>
|
| 161 |
-
|
| 162 |
-
<center><img src='https://api.infinitescript.com/badgen/count?name=jackrui/diff-amp-AMP_Sequence_Detector<ext=Visitors&color=6dc9aa' alt='visitors'></center>
|
| 163 |
"""
|
| 164 |
''')
|
| 165 |
|
|
|
|
| 16 |
class MyModel(nn.Module):
|
| 17 |
def __init__(self):
|
| 18 |
super().__init__()
|
| 19 |
+
self.bert1 = EsmForSequenceClassification.from_pretrained(model_checkpoint1, num_labels=512) # 3000
|
| 20 |
# for param in self.bert1.parameters():
|
| 21 |
# param.requires_grad = False
|
| 22 |
self.bn1 = nn.BatchNorm1d(256)
|
| 23 |
self.bn2 = nn.BatchNorm1d(128)
|
| 24 |
self.bn3 = nn.BatchNorm1d(64)
|
| 25 |
self.relu = nn.LeakyReLU()
|
| 26 |
+
self.fc1 = nn.Linear(512, 256)
|
| 27 |
self.fc2 = nn.Linear(256, 128)
|
| 28 |
self.fc3 = nn.Linear(128, 64)
|
| 29 |
self.output_layer = nn.Linear(64, 2)
|
|
|
|
| 96 |
"<p align='center' style='font-size: 20px;'>🔥Welcome to Antimicrobial Peptide Recognition Model. See our <a href='https://github.com/wrab12/diff-amp'>Project</a></p>")
|
| 97 |
gr.HTML(
|
| 98 |
'''<center>
|
| 99 |
+
<a href="https://huggingface.co/spaces/jackrui/ampD?duplicate=true">
|
| 100 |
<img src="https://bit.ly/3gLdBN6" alt="Duplicate Space">
|
| 101 |
</a>
|
| 102 |
</center>''')
|
|
|
|
| 131 |
gr.Markdown(
|
| 132 |
"<p align='center'><img src='https://pic4.zhimg.com/v2-eb2a7c0e746e67d1768090eec74f6787_b.jpg'></p>")
|
| 133 |
gr.Markdown(
|
| 134 |
+
"<p align='center' style='font-size: 20px;'>Related job links in the same series: <a href='https://huggingface.co/spaces/jackrui/ampG'>diff-amp-antimicrobial_peptide_generation</a> , <a href='https://huggingface.co/spaces/jackrui/ampPP'>Diff-AMP-property-prediction-model</a></p>")
|
| 135 |
gr.Markdown('''📝 **Citation**
|
| 136 |
If our work is useful for your research, please consider citing:
|
| 137 |
```
|
|
|
|
| 158 |
|
| 159 |
</tr>
|
| 160 |
</table>
|
| 161 |
+
<center><img src='https://api.infinitescript.com/badgen/count?name=jackrui/ampD<ext=Visitors&color=6dc9aa' alt='visitors'></center>
|
|
|
|
| 162 |
"""
|
| 163 |
''')
|
| 164 |
|