Update css && run button location
Browse files
app.py
CHANGED
|
@@ -134,7 +134,7 @@ if __name__ == "__main__":
|
|
| 134 |
.gradio-container {background-color: black; color: white;}
|
| 135 |
input, button, select, textarea, .gr-button, .gr-file, .gr-dropdown, .gr-image, .gr-file-upload {background-color: #333; color: white; border-color: white;}
|
| 136 |
.gr-button, .gr-file, .gr-dropdown, .gr-image, .gr-file-upload {border: 1px solid white;}
|
| 137 |
-
.gr-image-preview {background-color: #333; border: 1px solid white;}
|
| 138 |
"""
|
| 139 |
|
| 140 |
with gr.Blocks(css=css) as demo:
|
|
@@ -162,7 +162,7 @@ if __name__ == "__main__":
|
|
| 162 |
<ol style="list-style:none; padding-left:0;">
|
| 163 |
<li>1. Upload your `.h5ad` file</li>
|
| 164 |
<li>2. Select the species</li>
|
| 165 |
-
<li>3.
|
| 166 |
<li>4. Download the UMAP coordinates</li>
|
| 167 |
</ol>
|
| 168 |
</div>
|
|
@@ -178,14 +178,16 @@ if __name__ == "__main__":
|
|
| 178 |
# Define Gradio inputs and outputs
|
| 179 |
file_input = gr.File(label="Upload a .h5ad single cell gene expression file")
|
| 180 |
species_input = gr.Dropdown(choices=["human", "mouse"], label="Select species")
|
|
|
|
| 181 |
image_output = gr.Image(type="numpy", label="UMAP of UCE Embeddings")
|
| 182 |
file_output = gr.File(label="Download embeddings")
|
| 183 |
|
| 184 |
# Add the components and link to the function
|
| 185 |
-
|
| 186 |
fn=main,
|
| 187 |
inputs=[file_input, species_input],
|
| 188 |
outputs=[image_output, file_output]
|
| 189 |
)
|
| 190 |
-
|
| 191 |
demo.launch()
|
|
|
|
|
|
| 134 |
.gradio-container {background-color: black; color: white;}
|
| 135 |
input, button, select, textarea, .gr-button, .gr-file, .gr-dropdown, .gr-image, .gr-file-upload {background-color: #333; color: white; border-color: white;}
|
| 136 |
.gr-button, .gr-file, .gr-dropdown, .gr-image, .gr-file-upload {border: 1px solid white;}
|
| 137 |
+
.gr-image-preview {background-color: #333; color: white; border: 1px solid white;} /* Set image preview background to dark grey */
|
| 138 |
"""
|
| 139 |
|
| 140 |
with gr.Blocks(css=css) as demo:
|
|
|
|
| 162 |
<ol style="list-style:none; padding-left:0;">
|
| 163 |
<li>1. Upload your `.h5ad` file</li>
|
| 164 |
<li>2. Select the species</li>
|
| 165 |
+
<li>3. Click "Run" to view the UMAP scatter plot</li>
|
| 166 |
<li>4. Download the UMAP coordinates</li>
|
| 167 |
</ol>
|
| 168 |
</div>
|
|
|
|
| 178 |
# Define Gradio inputs and outputs
|
| 179 |
file_input = gr.File(label="Upload a .h5ad single cell gene expression file")
|
| 180 |
species_input = gr.Dropdown(choices=["human", "mouse"], label="Select species")
|
| 181 |
+
run_button = gr.Button("Run")
|
| 182 |
image_output = gr.Image(type="numpy", label="UMAP of UCE Embeddings")
|
| 183 |
file_output = gr.File(label="Download embeddings")
|
| 184 |
|
| 185 |
# Add the components and link to the function
|
| 186 |
+
run_button.click(
|
| 187 |
fn=main,
|
| 188 |
inputs=[file_input, species_input],
|
| 189 |
outputs=[image_output, file_output]
|
| 190 |
)
|
| 191 |
+
|
| 192 |
demo.launch()
|
| 193 |
+
|