| | import gradio as gr |
| | def one(text): |
| | return text |
| | if __name__ == "__main__": |
| | title = """<h1 align="center">🔥AMP Sequence Detector</h1>""" |
| | css = ".json {height: 527px; overflow: scroll;} .json-holder {height: 527px; overflow: scroll;}" |
| | theme = gr.themes.Soft(primary_hue="zinc", secondary_hue="blue", neutral_hue="green", |
| | text_size=gr.themes.sizes.text_lg) |
| | with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;} #chatbot {height: 520px; overflow: auto;}""", |
| | theme=theme) as demo: |
| |
|
| | gr.Markdown("<h1>Diff-AMP</h1>") |
| | gr.HTML(title) |
| |
|
| |
|
| | gr.Markdown( |
| | "<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>") |
| | gr.HTML( |
| | '''<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>''') |
| | gr.HTML( |
| | '''<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. |
| | 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>''') |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | |
| | examples = [ |
| | ["QGLFFLGAKLFYLLTLFL"], |
| | ["FLGLLFHGVHHVGKWIHGLIHGHH"], |
| | ["GLMSTLKGAATNAAVTLLNKLQCKLTGTC"] |
| | ] |
| |
|
| | |
| | iface = gr.Interface( |
| | fn=one, |
| | inputs="text", |
| | outputs="text", |
| | |
| | examples=examples |
| | ) |
| | gr.Markdown( |
| | "<p align='center'><img src='https://pic4.zhimg.com/v2-eb2a7c0e746e67d1768090eec74f6787_b.jpg'></p>") |
| |
|
| | demo.launch() |