text / app.py
jackrui's picture
Update app.py
a2935b0
raw
history blame
2.45 kB
import gradio as gr
def one(text):
return text
if __name__ == "__main__":
# css = ".json {height: 527px; overflow: scroll;} .json-holder {height: 527px; overflow: scroll;}"
with gr.Blocks() as demo:
gr.Markdown("<h1><center>Diff-AMP</center></h1>")
# gr.Markdown("<p align='center'><img src='download.jpg'></p>")
# gr.HTML("<p align='center'><img src='https://github.com/wrab12/diff-amp/blob/main/model.png'></p>")
gr.Markdown("""
![image](https://drive.google.com/file/d/1j99AXrLVPgIkcGEZG8pOaS3P1Ld3293D/view?usp=drive_link)
""")
# gr.Markdown("<p align='center'><img src='https://i.ibb.co/qNH3Jym/logo.png' height='25' width='95'></p>")
gr.Markdown(
"<p align='center' style='font-size: 20px;'>A system to connect LLMs with ML community. 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: Only a few models are deployed in the local inference endpoint due to hardware limitations. In addition, online HuggingFace inference endpoints may sometimes not be available. Thus the capability of HuggingGPT is limited.</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
)
demo.launch()