test out new css
Browse files
app.py
CHANGED
@@ -128,22 +128,40 @@ def main(input_file_path, species):
|
|
128 |
|
129 |
if __name__ == "__main__":
|
130 |
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
|
149 |
# if __name__ == "__main__":
|
|
|
128 |
|
129 |
if __name__ == "__main__":
|
130 |
|
131 |
+
css = """
|
132 |
+
body {background-color: black; color: white;}
|
133 |
+
.gradio-container {background-color: black; color: white;}
|
134 |
+
input, button, select, textarea {background-color: #333; color: white;}
|
135 |
+
"""
|
136 |
+
|
137 |
+
with gr.Blocks(css=css) as demo:
|
138 |
+
gr.Markdown(
|
139 |
+
"""
|
140 |
+
### UCE 100M Demo
|
141 |
+
|
142 |
+
**Instructions:**
|
143 |
+
1. Upload a `.h5ad` single cell gene expression file.
|
144 |
+
2. Select the species (Human/Mouse).
|
145 |
+
3. View the UMAP scatter plot and download the UMAP embeddings.
|
146 |
+
"""
|
147 |
+
)
|
148 |
+
|
149 |
+
# Define Gradio inputs and outputs
|
150 |
+
file_input = gr.File(label="Upload a .h5ad single cell gene expression file")
|
151 |
+
species_input = gr.Dropdown(choices=["human", "mouse"], label="Select species")
|
152 |
+
image_output = gr.Image(type="numpy", label="UMAP of UCE Embeddings")
|
153 |
+
file_output = gr.File(label="Download embeddings")
|
154 |
+
|
155 |
+
# Create the Gradio interface
|
156 |
+
demo = gr.Interface(
|
157 |
+
fn=main,
|
158 |
+
inputs=[file_input, species_input],
|
159 |
+
outputs=[image_output, file_output],
|
160 |
+
title="UCE 100M Demo",
|
161 |
+
description="Upload a .h5ad single cell gene expression file, and get a UMAP scatter plot along with the UMAP coordinates in a CSV file."
|
162 |
+
)
|
163 |
+
|
164 |
+
demo.launch()
|
165 |
|
166 |
|
167 |
# if __name__ == "__main__":
|