File size: 2,845 Bytes
4524629
 
 
 
8d3f563
 
 
 
 
 
 
 
 
 
 
4524629
8d3f563
4524629
 
 
8d3f563
 
4524629
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a2935b0
4524629
 
8d3f563
4524629
 
8d3f563
 
4524629
bfcbc9d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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>''')

    # gr.Markdown(
    #     """
    #
    # # Welcome to Antimicrobial Peptide Recognition Model
    # 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.
    #
    #     """)

    # 添加示例输入和输出
        examples = [
        ["QGLFFLGAKLFYLLTLFL"],
        ["FLGLLFHGVHHVGKWIHGLIHGHH"],
        ["GLMSTLKGAATNAAVTLLNKLQCKLTGTC"]
    ]

    # 创建 Gradio 接口并应用美化样式和示例
        iface = gr.Interface(
        fn=one,
        inputs="text",
        outputs="text",
        # title="AMP Sequence Detector",
        examples=examples
    )
        gr.Markdown(
            "<p align='center'><img src='https://pic4.zhimg.com/v2-eb2a7c0e746e67d1768090eec74f6787_b.jpg'></p>")

    demo.launch()