Update app.py
Browse files
app.py
CHANGED
|
@@ -2,21 +2,24 @@ import gradio as gr
|
|
| 2 |
def one(text):
|
| 3 |
return text
|
| 4 |
if __name__ == "__main__":
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
gr.
|
|
|
|
|
|
|
| 14 |
gr.Markdown(
|
| 15 |
-
"<p align='center' style='font-size: 20px;'
|
| 16 |
gr.HTML(
|
| 17 |
'''<center><a href="https://huggingface.co/spaces/jackrui/diff-amp-AMP_Sequence_Detector?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a></center>''')
|
| 18 |
gr.HTML(
|
| 19 |
-
'''<center
|
|
|
|
| 20 |
|
| 21 |
# gr.Markdown(
|
| 22 |
# """
|
|
@@ -39,8 +42,10 @@ if __name__ == "__main__":
|
|
| 39 |
fn=one,
|
| 40 |
inputs="text",
|
| 41 |
outputs="text",
|
| 42 |
-
title="AMP Sequence Detector",
|
| 43 |
examples=examples
|
| 44 |
)
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
|
|
|
|
| 2 |
def one(text):
|
| 3 |
return text
|
| 4 |
if __name__ == "__main__":
|
| 5 |
+
title = """<h1 align="center">🔥AMP Sequence Detector</h1>"""
|
| 6 |
+
css = ".json {height: 527px; overflow: scroll;} .json-holder {height: 527px; overflow: scroll;}"
|
| 7 |
+
theme = gr.themes.Soft(primary_hue="zinc", secondary_hue="blue", neutral_hue="green",
|
| 8 |
+
text_size=gr.themes.sizes.text_lg)
|
| 9 |
+
with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;} #chatbot {height: 520px; overflow: auto;}""",
|
| 10 |
+
theme=theme) as demo:
|
| 11 |
+
|
| 12 |
+
gr.Markdown("<h1>Diff-AMP</h1>")
|
| 13 |
+
gr.HTML(title)
|
| 14 |
+
|
| 15 |
+
|
| 16 |
gr.Markdown(
|
| 17 |
+
"<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>")
|
| 18 |
gr.HTML(
|
| 19 |
'''<center><a href="https://huggingface.co/spaces/jackrui/diff-amp-AMP_Sequence_Detector?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a></center>''')
|
| 20 |
gr.HTML(
|
| 21 |
+
'''<center>🌟Note: This is an antimicrobial peptide recognition model derived from Diff-AMP, which is a branch of a comprehensive system integrating generation, recognition, and optimization. In this recognition model, you can simply input a sequence, and it will predict whether it is an antimicrobial peptide. Due to limited website capacity, we can only perform simple predictions.
|
| 22 |
+
If you require large-scale computations, please contact my email at wangrui66677@gmail.com. Feel free to reach out if you have any questions or inquiries.</center>''')
|
| 23 |
|
| 24 |
# gr.Markdown(
|
| 25 |
# """
|
|
|
|
| 42 |
fn=one,
|
| 43 |
inputs="text",
|
| 44 |
outputs="text",
|
| 45 |
+
# title="AMP Sequence Detector",
|
| 46 |
examples=examples
|
| 47 |
)
|
| 48 |
+
gr.Markdown(
|
| 49 |
+
"<p align='center'><img src='https://pic4.zhimg.com/v2-eb2a7c0e746e67d1768090eec74f6787_b.jpg'></p>")
|
| 50 |
|
| 51 |
+
demo.launch()
|