jackrui commited on
Commit
8d3f563
·
1 Parent(s): e695517

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -13
app.py CHANGED
@@ -2,21 +2,24 @@ 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.Markdown("<p align='center'><img src='https://github.com/wrab12/diff-amp/blob/main/model.png'></p>")
10
- # gr.Markdown("""
11
- # ![image](https://github.com/wrab12/diff-amp/blob/main/model.png)
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
  # """
@@ -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
- demo.launch()
 
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()