Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -289,8 +289,6 @@ 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 |
-
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)
|
@@ -316,7 +314,9 @@ with gr.Blocks() as interface:
|
|
316 |
processed_accessions = 0 # β
track successful accessions
|
317 |
email_tracked = False
|
318 |
log_lines = []
|
319 |
-
|
|
|
|
|
320 |
# Step 2: Loop through accessions
|
321 |
for i, acc in enumerate(accessions):
|
322 |
if global_stop_flag.value:
|
@@ -335,7 +335,8 @@ with gr.Blocks() as interface:
|
|
335 |
yield (
|
336 |
make_html_table(all_rows),
|
337 |
gr.update(visible=True),
|
338 |
-
gr.update(value=output_file_path, visible=True),
|
|
|
339 |
gr.update(value=usage_text, visible=True),
|
340 |
"π Stopped",
|
341 |
"\n".join(log_lines)
|
@@ -386,7 +387,8 @@ with gr.Blocks() as interface:
|
|
386 |
yield (
|
387 |
make_html_table(all_rows),
|
388 |
gr.update(visible=True),
|
389 |
-
gr.update(value=output_file_path, visible=True),
|
|
|
390 |
gr.update(value=usage_text, visible=True),
|
391 |
"β
Done",
|
392 |
"\n".join(log_lines)
|
|
|
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 |
# Step 1: Parse input
|
293 |
accessions, error = extract_accessions_from_input(file, text)
|
294 |
print("π§ͺ Accessions received:", accessions)
|
|
|
314 |
processed_accessions = 0 # β
track successful accessions
|
315 |
email_tracked = False
|
316 |
log_lines = []
|
317 |
+
if not email.strip():
|
318 |
+
output_file_path = None#"Write your email so that you can download the outputs."
|
319 |
+
log_lines.append("π₯ Provide your email to receive a downloadable Excel report.")
|
320 |
# Step 2: Loop through accessions
|
321 |
for i, acc in enumerate(accessions):
|
322 |
if global_stop_flag.value:
|
|
|
335 |
yield (
|
336 |
make_html_table(all_rows),
|
337 |
gr.update(visible=True),
|
338 |
+
#gr.update(value=output_file_path, visible=True),
|
339 |
+
gr.update(value=output_file_path, visible=bool(output_file_path)),
|
340 |
gr.update(value=usage_text, visible=True),
|
341 |
"π Stopped",
|
342 |
"\n".join(log_lines)
|
|
|
387 |
yield (
|
388 |
make_html_table(all_rows),
|
389 |
gr.update(visible=True),
|
390 |
+
#gr.update(value=output_file_path, visible=True),
|
391 |
+
gr.update(value=output_file_path, visible=bool(output_file_path)),
|
392 |
gr.update(value=usage_text, visible=True),
|
393 |
"β
Done",
|
394 |
"\n".join(log_lines)
|