Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1050,8 +1050,10 @@ def submit_predict(predict_filepath, task, preset, target_family, opts, job_info
|
|
1050 |
|
1051 |
max_sim.cache_clear()
|
1052 |
|
1053 |
-
prediction_df.drop(
|
1054 |
-
|
|
|
|
|
1055 |
|
1056 |
return {run_state: False}
|
1057 |
|
@@ -2750,13 +2752,16 @@ QALAHAYFAQYHDPDDEPVADPYDQSFESRDLLIDEWKSLTYDEVISFVPPPLDQEEMES
|
|
2750 |
else:
|
2751 |
return {report_task: gr.Dropdown(visible=False)}
|
2752 |
|
2753 |
-
|
2754 |
report_df_change = file_for_report.change(
|
2755 |
fn=update_df, inputs=file_for_report, outputs=[html_report, raw_df, report_df, analyze_btn, report_task],
|
2756 |
concurrency_limit=100,
|
2757 |
).success(
|
2758 |
-
fn=lambda: [gr.Button(interactive=True)] *
|
2759 |
-
|
|
|
|
|
|
|
|
|
2760 |
)
|
2761 |
|
2762 |
file_for_report.upload(
|
|
|
1050 |
|
1051 |
max_sim.cache_clear()
|
1052 |
|
1053 |
+
prediction_df.drop(
|
1054 |
+
[col for col in ['N', 'FP'] if col in prediction_df.columns], axis=1
|
1055 |
+
).to_csv(predictions_file, index=False, na_rep='')
|
1056 |
+
status = 'COMPLETED'
|
1057 |
|
1058 |
return {run_state: False}
|
1059 |
|
|
|
2752 |
else:
|
2753 |
return {report_task: gr.Dropdown(visible=False)}
|
2754 |
|
|
|
2755 |
report_df_change = file_for_report.change(
|
2756 |
fn=update_df, inputs=file_for_report, outputs=[html_report, raw_df, report_df, analyze_btn, report_task],
|
2757 |
concurrency_limit=100,
|
2758 |
).success(
|
2759 |
+
fn=lambda: [gr.Button(interactive=True)] * 3 +
|
2760 |
+
[gr.File(visible=False, value=None)] * 2 +
|
2761 |
+
[gr.Dropdown(visible=False, value=None), ''],
|
2762 |
+
outputs=[
|
2763 |
+
csv_generate, html_generate, analyze_btn, csv_download_file, html_download_file, report_task, html_report
|
2764 |
+
],
|
2765 |
)
|
2766 |
|
2767 |
file_for_report.upload(
|