Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -289,7 +289,8 @@ with gr.Blocks() as interface:
|
|
289 |
tmp_dir = tempfile.mkdtemp()
|
290 |
output_file_path = os.path.join(tmp_dir, "batch_output_live.xlsx")
|
291 |
limited_acc = 50 + (0 if email.strip() else 0)
|
292 |
-
|
|
|
293 |
# Step 1: Parse input
|
294 |
accessions, error = extract_accessions_from_input(file, text)
|
295 |
print("🧪 Accessions received:", accessions)
|
@@ -356,7 +357,8 @@ with gr.Blocks() as interface:
|
|
356 |
rows = summarize_results(acc)
|
357 |
all_rows.extend(rows)
|
358 |
processed_accessions += 1 # ✅ only count success
|
359 |
-
|
|
|
360 |
log_lines.append(f"✅ Processed {acc} ({i+1}/{total})")
|
361 |
except Exception as e:
|
362 |
log_lines.append(f"❌ Failed to process {acc}: {e}")
|
|
|
289 |
tmp_dir = tempfile.mkdtemp()
|
290 |
output_file_path = os.path.join(tmp_dir, "batch_output_live.xlsx")
|
291 |
limited_acc = 50 + (0 if email.strip() else 0)
|
292 |
+
if not email.strip():
|
293 |
+
output_file_path = "Write your email so that you can download the outputs."
|
294 |
# Step 1: Parse input
|
295 |
accessions, error = extract_accessions_from_input(file, text)
|
296 |
print("🧪 Accessions received:", accessions)
|
|
|
357 |
rows = summarize_results(acc)
|
358 |
all_rows.extend(rows)
|
359 |
processed_accessions += 1 # ✅ only count success
|
360 |
+
if email.strip():
|
361 |
+
save_to_excel(all_rows, "", "", output_file_path, is_resume=False)
|
362 |
log_lines.append(f"✅ Processed {acc} ({i+1}/{total})")
|
363 |
except Exception as e:
|
364 |
log_lines.append(f"❌ Failed to process {acc}: {e}")
|