Revert to no md description
Browse files
app.py
CHANGED
|
@@ -125,12 +125,8 @@ def main(input_file_path, species):
|
|
| 125 |
|
| 126 |
return img, output_file
|
| 127 |
|
| 128 |
-
|
| 129 |
-
if __name__ == "__main__":
|
| 130 |
|
| 131 |
-
|
| 132 |
-
with open('description.md', 'r') as file:
|
| 133 |
-
description_md = file.read()
|
| 134 |
|
| 135 |
# Define Gradio inputs and outputs
|
| 136 |
file_input = gr.File(label="Upload a .h5ad single cell gene expression file")
|
|
@@ -139,14 +135,38 @@ if __name__ == "__main__":
|
|
| 139 |
file_output = gr.File(label="Download embeddings")
|
| 140 |
|
| 141 |
# Create the Gradio interface
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
|
|
|
|
| 125 |
|
| 126 |
return img, output_file
|
| 127 |
|
|
|
|
|
|
|
| 128 |
|
| 129 |
+
if __name__ == "__main__":
|
|
|
|
|
|
|
| 130 |
|
| 131 |
# Define Gradio inputs and outputs
|
| 132 |
file_input = gr.File(label="Upload a .h5ad single cell gene expression file")
|
|
|
|
| 135 |
file_output = gr.File(label="Download embeddings")
|
| 136 |
|
| 137 |
# Create the Gradio interface
|
| 138 |
+
demo = gr.Interface(
|
| 139 |
+
fn=main,
|
| 140 |
+
inputs=[file_input, species_input],
|
| 141 |
+
outputs=[image_output, file_output],
|
| 142 |
+
title="UCE 100M Demo",
|
| 143 |
+
description="Upload a .h5ad single cell gene expression file, and get a UMAP scatter plot along with the UMAP coordinates in a CSV file."
|
| 144 |
+
)
|
| 145 |
+
|
| 146 |
+
demo.launch()
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
# if __name__ == "__main__":
|
| 150 |
+
|
| 151 |
+
# # Read the Markdown content from the .md file
|
| 152 |
+
# with open('description.md', 'r') as file:
|
| 153 |
+
# description_md = file.read()
|
| 154 |
+
|
| 155 |
+
# # Define Gradio inputs and outputs
|
| 156 |
+
# file_input = gr.File(label="Upload a .h5ad single cell gene expression file")
|
| 157 |
+
# species_input = gr.Dropdown(choices=["human", "mouse"], label="Select species")
|
| 158 |
+
# image_output = gr.Image(type="numpy", label="UMAP of UCE Embeddings")
|
| 159 |
+
# file_output = gr.File(label="Download embeddings")
|
| 160 |
+
|
| 161 |
+
# # Create the Gradio interface
|
| 162 |
+
# with gr.Blocks() as demo:
|
| 163 |
+
# gr.Markdown(description_md) # Add the Markdown section
|
| 164 |
+
# # Create the Gradio interface
|
| 165 |
+
# demo = gr.Interface(
|
| 166 |
+
# fn=main,
|
| 167 |
+
# inputs=[file_input, species_input],
|
| 168 |
+
# outputs=[image_output, file_output],
|
| 169 |
+
# title="UCE 100M Demo",
|
| 170 |
+
# description="Upload a .h5ad single cell gene expression file, and get a UMAP scatter plot along with the UMAP coordinates in a CSV file."
|
| 171 |
+
# ).launch()
|
| 172 |
|