Spaces:
Runtime error
Runtime error
updated app.py
Browse files431 unmodified lines43243343443543543643743817 unmodified lines45645745845945946046146225 unmodified lines4884894904914914924934943 unmodified lines498499500501501502503504431 unmodified lines if len(probabilities) < 1: return None prob_df = pd.DataFrame({"labels": cell_types, "values": probabilities}) prob_df.to_csv('Cell_types_predictions.csv', index=False) prob_df.to_csv('./Cell_types_predictions.csv', index=False) return prob_df
def run_mapping():17 unmodified lines return "Registration complete!"
def download_csv(): return 'Cell_types_predictions.csv' return './Cell_types_predictions.csv'
def handle_data_type_change(dt):25 unmodified lines slice_slider = gr.Slider(minimum=0, maximum=0, value=0, step=1, label="Slices", visible=False) with gr.Column(scale=1): gr.Markdown("### Step 3: Visualizing Allen Brain Cell Types Atlas") gallery = gr.Gallery(label="ABC Atlas", value = gallery_images,) gallery = gr.Gallery(label="ABC Atlas", value = gallery_images,columns = 5, height = 450) gr.Markdown("**Step 4: Run cell type mapping**") with gr.Row(): run_button = gr.Button("Run Mapping")3 unmodified lines gr.Markdown("### Step 5: Quantitative results of the mapping model.") prob_plot = gr.BarPlot(prob_df, x="labels", y="values", title="Cell Type Probabilities", scroll_to_output=True, x_label_angle=-90, height=400) gr.Markdown("### Step 6: Download Results.") download_button = gr.DownloadButton(label="Download Results", value='Cell_types_predictions.csv') download_button = gr.DownloadButton(label="Download Results", value='./Cell_types_predictions.csv')
nifti_file.change( load_nifti_or_png,app.py+4-4