Spaces:
Runtime error
Runtime error
minor update
Browse files431 unmodified lines43243343443543643743817 unmodified lines45645745845946046146235 unmodified lines498499500501502503504431 unmodified linesif len(probabilities) < 1:return Noneprob_df = pd.DataFrame({"labels": cell_types, "values": probabilities})prob_df.to_csv('./Cell_types_predictions.csv', index=False)return prob_dfdef run_mapping():17 unmodified linesreturn "Registration complete!"def download_csv():return './Cell_types_predictions.csv'def handle_data_type_change(dt):35 unmodified linesgr.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')nifti_file.change(load_nifti_or_png,431 unmodified lines43243343443543643743843917 unmodified lines45745845946046146246335 unmodified lines499500501502503504505431 unmodified linesif len(probabilities) < 1:return Noneprob_df = pd.DataFrame({"labels": cell_types, "values": probabilities})os.makedirs("outputs", exist_ok=True)prob_df.to_csv('outputs/Cell_types_predictions.csv', index=False)return prob_dfdef run_mapping():17 unmodified linesreturn "Registration complete!"def download_csv():return 'outputs/Cell_types_predictions.csv'def handle_data_type_change(dt):35 unmodified linesgr.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='outputs/Cell_types_predictions.csv')nifti_file.change(load_nifti_or_png,
app.py+4-3