minwoosun commited on
Commit
74c9854
·
verified ·
1 Parent(s): 45f0e71

Update app.py to include demo description

Browse files
Files changed (1) hide show
  1. app.py +14 -10
app.py CHANGED
@@ -128,6 +128,10 @@ def main(input_file_path, species):
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")
133
  species_input = gr.Dropdown(choices=["human", "mouse"], label="Select species")
@@ -135,14 +139,14 @@ if __name__ == "__main__":
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
 
 
128
 
129
  if __name__ == "__main__":
130
 
131
+ # Read the Markdown content from the .md file
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")
137
  species_input = gr.Dropdown(choices=["human", "mouse"], label="Select species")
 
139
  file_output = gr.File(label="Download embeddings")
140
 
141
  # Create the Gradio interface
142
+ with gr.Blocks() as demo:
143
+ gr.Markdown(description_md) # Add the Markdown section
144
+ # Create the Gradio interface
145
+ demo = gr.Interface(
146
+ fn=main,
147
+ inputs=[file_input, species_input],
148
+ outputs=[image_output, file_output],
149
+ title="UCE 100M Demo",
150
+ description="Upload a .h5ad single cell gene expression file, and get a UMAP scatter plot along with the UMAP coordinates in a CSV file."
151
+ ).launch()
152