Gradio app - initial
Browse files- .gitattributes +1 -0
- app.py +25 -0
- data/protein_clusters.xlsx +0 -0
- data/protein_dendrogram.png +3 -0
- requirements.txt +3 -0
.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
|
requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
gradio==4.31.1
|
2 |
+
pandas==2.2.2
|
3 |
+
openpyxl==3.1.2
|