Update app.py
Browse files
app.py
CHANGED
@@ -308,24 +308,4 @@ with gr.Blocks() as app:
|
|
308 |
aiornot2, [inp], [outp2, n_out2]).then(
|
309 |
tot_prob, None, fin, show_progress=False)
|
310 |
|
311 |
-
# Tab for batch processing
|
312 |
-
with gr.Tab("Batch Image Processing"):
|
313 |
-
zip_file = gr.File(label="Upload Zip (two folders: real, ai)")
|
314 |
-
batch_btn = gr.Button("Process Batch")
|
315 |
-
|
316 |
-
for i, model in enumerate(models):
|
317 |
-
with gr.Group():
|
318 |
-
gr.Markdown(f"### Results for {model}")
|
319 |
-
globals()[f'output_acc{i}'] = gr.Label(label=f"Model {i} Accuracy")
|
320 |
-
globals()[f'output_roc{i}'] = gr.Label(label=f"Model {i} ROC Score")
|
321 |
-
globals()[f'output_report{i}'] = gr.Textbox(label=f"Model {i} Classification Report", lines=10)
|
322 |
-
globals()[f'output_cm{i}'] = gr.Plot(label=f"Model {i} Confusion Matrix")
|
323 |
-
globals()[f'output_roc_plot{i}'] = gr.Plot(label=f"Model {i} ROC Curve")
|
324 |
-
|
325 |
-
# Connect batch processing
|
326 |
-
batch_btn.click(process_zip, zip_file,
|
327 |
-
[output_acc0, output_roc0, output_report0, output_cm0, output_roc_plot0,
|
328 |
-
output_acc1, output_roc1, output_report1, output_cm1, output_roc_plot1,
|
329 |
-
output_acc2, output_roc2, output_report2, output_cm2, output_roc_plot2])
|
330 |
-
|
331 |
app.launch(show_api=False, max_threads=24)
|
|
|
308 |
aiornot2, [inp], [outp2, n_out2]).then(
|
309 |
tot_prob, None, fin, show_progress=False)
|
310 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
app.launch(show_api=False, max_threads=24)
|