unikei commited on
Commit
ff1487e
1 Parent(s): 4976702

Gradio app - initial

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ data/protein_dendrogram.png filter=lfs diff=lfs merge=lfs -text
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+
4
+ text = "This app displays protein similarity captured in the model " \
5
+ "[unikei/bert-base-proteins](https://huggingface.co/unikei/bert-base-proteins)."
6
+
7
+ image_path = "data/protein_dendrogram.png"
8
+
9
+ protein_clusters = pd.read_excel('data/protein_clusters.xlsx')
10
+
11
+ with gr.Blocks() as demo:
12
+ gr.Markdown("# Protein similarity from BERT point of view")
13
+ gr.Markdown(text)
14
+
15
+ gr.Image(image_path,
16
+ label="Right click to zoom in new tab.",
17
+ container=True
18
+ )
19
+
20
+ gr.DataFrame(protein_clusters,
21
+ interactive=True,
22
+ wrap=False,
23
+ column_widths=[5, 5, 30, 30, 30])
24
+
25
+ demo.launch()
data/protein_clusters.xlsx ADDED
Binary file (211 kB). View file
 
data/protein_dendrogram.png ADDED

Git LFS Details

  • SHA256: 1442017dc00760b980ae3db4d826b47749ad78118ecb67e48d1793c2c0bacf6b
  • Pointer size: 132 Bytes
  • Size of remote file: 1.47 MB
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio==4.31.1
2
+ pandas==2.2.2
3
+ openpyxl==3.1.2