minwoosun commited on
Commit
edcbfa5
·
verified ·
1 Parent(s): 0c993ce

reset output for example

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -211,6 +211,10 @@ if __name__ == "__main__":
211
  '''
212
  )
213
 
 
 
 
 
214
  # Define Gradio inputs and outputs
215
  file_input = gr.File(label="Upload a .h5ad single cell gene expression file or select a default dataset below")
216
  # species_input = gr.Dropdown(choices=["human", "mouse"], label="Select species")
@@ -232,6 +236,10 @@ if __name__ == "__main__":
232
  image_output = gr.Image(type="numpy", label="UMAP of UCE Embeddings")
233
  file_output = gr.File(label="Download embeddings")
234
  pred_output = gr.File(label="Download predictions")
 
 
 
 
235
 
236
  # Add the components and link to the function
237
  run_button.click(
@@ -240,13 +248,10 @@ if __name__ == "__main__":
240
  outputs=[image_output, file_output, pred_output]
241
  )
242
 
243
- default_dataset_1_path = hf_hub_download(repo_id="minwoosun/uce-misc", filename="100_pbmcs_proc_subset.h5ad")
244
- default_dataset_2_path = hf_hub_download(repo_id="minwoosun/uce-misc", filename="1k_pbmcs_proc_subset.h5ad")
245
-
246
  examples = gr.Examples(
247
  examples=[[default_dataset_1_path, "human", "PBMC 100 cells"],[default_dataset_2_path, "human", "PBMC 1000 cells"]],
248
  inputs=[file_input, species_input, default_dataset_input],
249
- # outputs=[image_output, file_output, pred_output],
250
  fn=main,
251
  cache_examples=True
252
  )
 
211
  '''
212
  )
213
 
214
+ # download default datasets and assign paths
215
+ default_dataset_1_path = hf_hub_download(repo_id="minwoosun/uce-misc", filename="100_pbmcs_proc_subset.h5ad")
216
+ default_dataset_2_path = hf_hub_download(repo_id="minwoosun/uce-misc", filename="1k_pbmcs_proc_subset.h5ad")
217
+
218
  # Define Gradio inputs and outputs
219
  file_input = gr.File(label="Upload a .h5ad single cell gene expression file or select a default dataset below")
220
  # species_input = gr.Dropdown(choices=["human", "mouse"], label="Select species")
 
236
  image_output = gr.Image(type="numpy", label="UMAP of UCE Embeddings")
237
  file_output = gr.File(label="Download embeddings")
238
  pred_output = gr.File(label="Download predictions")
239
+
240
+ print(image_output)
241
+ print(file_output)
242
+ print(pred_output)
243
 
244
  # Add the components and link to the function
245
  run_button.click(
 
248
  outputs=[image_output, file_output, pred_output]
249
  )
250
 
 
 
 
251
  examples = gr.Examples(
252
  examples=[[default_dataset_1_path, "human", "PBMC 100 cells"],[default_dataset_2_path, "human", "PBMC 1000 cells"]],
253
  inputs=[file_input, species_input, default_dataset_input],
254
+ outputs=[image_output, file_output, pred_output],
255
  fn=main,
256
  cache_examples=True
257
  )