jackrui commited on
Commit
4524629
1 Parent(s): 3d7b7e0

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +46 -0
app.py ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ def one(text):
3
+ return text
4
+ if __name__ == "__main__":
5
+ # css = ".json {height: 527px; overflow: scroll;} .json-holder {height: 527px; overflow: scroll;}"
6
+ with gr.Blocks() as demo:
7
+ gr.Markdown("<h1><center>Diff-AMP</center></h1>")
8
+ # gr.Markdown("<p align='center'><img src='download.jpg'></p>")
9
+ # gr.HTML("<p align='center'><img src='https://github.com/wrab12/diff-amp/blob/main/model.png'></p>")
10
+ gr.Markdown("""
11
+ ![image](https://drive.google.com/file/d/1j99AXrLVPgIkcGEZG8pOaS3P1Ld3293D/view?usp=drive_link)
12
+ """)
13
+ # gr.Markdown("<p align='center'><img src='https://i.ibb.co/qNH3Jym/logo.png' height='25' width='95'></p>")
14
+ gr.Markdown(
15
+ "<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>")
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>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>''')
20
+
21
+ # gr.Markdown(
22
+ # """
23
+ #
24
+ # # Welcome to Antimicrobial Peptide Recognition Model
25
+ # 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.
26
+ # 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.
27
+ #
28
+ # """)
29
+
30
+ # 添加示例输入和输出
31
+ examples = [
32
+ ["QGLFFLGAKLFYLLTLFL"],
33
+ ["FLGLLFHGVHHVGKWIHGLIHGHH"],
34
+ ["GLMSTLKGAATNAAVTLLNKLQCKLTGTC"]
35
+ ]
36
+
37
+ # 创建 Gradio 接口并应用美化样式和示例
38
+ iface = gr.Interface(
39
+ fn=classify_sequence,
40
+ inputs="text",
41
+ outputs="text",
42
+ title="AMP Sequence Detector",
43
+ examples=examples
44
+ )
45
+
46
+ demo.launch()