Try simple css and reduced markdown
Browse files
app.py
CHANGED
|
@@ -126,16 +126,12 @@ def main(input_file_path, species):
|
|
| 126 |
return img, output_file
|
| 127 |
|
| 128 |
|
| 129 |
-
|
| 130 |
if __name__ == "__main__":
|
| 131 |
|
| 132 |
css = """
|
| 133 |
body {background-color: black; color: white;}
|
| 134 |
.gradio-container {background-color: black; color: white;}
|
| 135 |
-
|
| 136 |
-
.gr-button, .gr-file, .gr-dropdown, .gr-image, .gr-file-upload, .gr-output, .gr-output-image, .gr-output-file {border: 1px solid white;}
|
| 137 |
-
.gr-output, .gr-output-image, .gr-output-file, .output_image, .output_file {background-color: #333 !important; color: white !important; border-color: white !important;}
|
| 138 |
-
.gr-image-preview {background-color: #333 !important; color: white !important; border-color: white !important;}
|
| 139 |
"""
|
| 140 |
|
| 141 |
with gr.Blocks(css=css) as demo:
|
|
@@ -144,35 +140,6 @@ if __name__ == "__main__":
|
|
| 144 |
<div style="text-align:center; margin-bottom:20px;">
|
| 145 |
<span style="font-size:3em; font-weight:bold; color: white;">UCE 100M Demo</span>
|
| 146 |
</div>
|
| 147 |
-
<div style="text-align:center; margin-bottom:10px;">
|
| 148 |
-
<span style="font-size:1.5em; font-weight:bold; color: white;">Universal Cell Embeddings: Explore Single Cell Data</span>
|
| 149 |
-
</div>
|
| 150 |
-
<div style="text-align:center; margin-bottom:20px;">
|
| 151 |
-
<a href="https://github.com/minwoosun/UCE">
|
| 152 |
-
<img src="https://badges.aleen42.com/src/github.svg" alt="GitHub" style="display:inline-block; margin-right:10px;">
|
| 153 |
-
</a>
|
| 154 |
-
<a href="https://www.biorxiv.org/content/10.1101/2023.11.28.568918v1">
|
| 155 |
-
<img src="https://img.shields.io/badge/bioRxiv-2023.11.28.568918-green?style=plastic" alt="Paper" style="display:inline-block; margin-right:10px;">
|
| 156 |
-
</a>
|
| 157 |
-
</div>
|
| 158 |
-
<div style="text-align:left; margin-bottom:20px; color: white;">
|
| 159 |
-
Upload a `.h5ad` single cell gene expression file and select the species (Human/Mouse).
|
| 160 |
-
The demo will generate UMAP projections of the embeddings and allow you to download the embeddings for further analysis.
|
| 161 |
-
</div>
|
| 162 |
-
<div style="margin-bottom:20px; color: white;">
|
| 163 |
-
<ol style="list-style:none; padding-left:0;">
|
| 164 |
-
<li>1. Upload your `.h5ad` file</li>
|
| 165 |
-
<li>2. Select the species</li>
|
| 166 |
-
<li>3. Click "Run" to view the UMAP scatter plot</li>
|
| 167 |
-
<li>4. Download the UMAP coordinates</li>
|
| 168 |
-
</ol>
|
| 169 |
-
</div>
|
| 170 |
-
<div style="text-align:left; line-height:1.8; color: white;">
|
| 171 |
-
Please consider citing the following paper if you use this tool in your research:
|
| 172 |
-
</div>
|
| 173 |
-
<div style="text-align:left; line-height:1.8; color: white;">
|
| 174 |
-
Rosen, Y., Roohani, Y., Agarwal, A., Samotorčan, L., Tabula Sapiens Consortium, Quake, S. R., & Leskovec, J. Universal Cell Embeddings: A Foundation Model for Cell Biology. bioRxiv. https://doi.org/10.1101/2023.11.28.568918
|
| 175 |
-
</div>
|
| 176 |
'''
|
| 177 |
)
|
| 178 |
|
|
@@ -190,4 +157,4 @@ if __name__ == "__main__":
|
|
| 190 |
outputs=[image_output, file_output]
|
| 191 |
)
|
| 192 |
|
| 193 |
-
demo.launch()
|
|
|
|
| 126 |
return img, output_file
|
| 127 |
|
| 128 |
|
|
|
|
| 129 |
if __name__ == "__main__":
|
| 130 |
|
| 131 |
css = """
|
| 132 |
body {background-color: black; color: white;}
|
| 133 |
.gradio-container {background-color: black; color: white;}
|
| 134 |
+
.gr-file, .gr-image {background-color: #333; color: white; border-color: white;}
|
|
|
|
|
|
|
|
|
|
| 135 |
"""
|
| 136 |
|
| 137 |
with gr.Blocks(css=css) as demo:
|
|
|
|
| 140 |
<div style="text-align:center; margin-bottom:20px;">
|
| 141 |
<span style="font-size:3em; font-weight:bold; color: white;">UCE 100M Demo</span>
|
| 142 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
'''
|
| 144 |
)
|
| 145 |
|
|
|
|
| 157 |
outputs=[image_output, file_output]
|
| 158 |
)
|
| 159 |
|
| 160 |
+
demo.launch()
|