Update app.py
Browse files
app.py
CHANGED
|
@@ -93,7 +93,7 @@ def CTXGen(X0, X3, X1, X2, τ, g_num, model_name):
|
|
| 93 |
new_seq = None
|
| 94 |
gen_len = len(X0)
|
| 95 |
if is_stopped:
|
| 96 |
-
return pd.DataFrame()
|
| 97 |
|
| 98 |
if time.time() - start_time > 1200:
|
| 99 |
break
|
|
@@ -108,7 +108,7 @@ def CTXGen(X0, X3, X1, X2, τ, g_num, model_name):
|
|
| 108 |
length = gen_length - sum(1 for x in input_text if x != '[MASK]')
|
| 109 |
for i in range(length):
|
| 110 |
if is_stopped:
|
| 111 |
-
return pd.DataFrame()
|
| 112 |
|
| 113 |
_, idx_seq, idx_msa, attn_idx = get_paded_token_idx_gen(vocab_mlm, seq, new_seq)
|
| 114 |
idx_seq = torch.tensor(idx_seq).unsqueeze(0).to(device)
|
|
|
|
| 93 |
new_seq = None
|
| 94 |
gen_len = len(X0)
|
| 95 |
if is_stopped:
|
| 96 |
+
return "output.csv", pd.DataFrame()
|
| 97 |
|
| 98 |
if time.time() - start_time > 1200:
|
| 99 |
break
|
|
|
|
| 108 |
length = gen_length - sum(1 for x in input_text if x != '[MASK]')
|
| 109 |
for i in range(length):
|
| 110 |
if is_stopped:
|
| 111 |
+
return "output.csv", pd.DataFrame()
|
| 112 |
|
| 113 |
_, idx_seq, idx_msa, attn_idx = get_paded_token_idx_gen(vocab_mlm, seq, new_seq)
|
| 114 |
idx_seq = torch.tensor(idx_seq).unsqueeze(0).to(device)
|