oucgc1996 commited on
Commit
ca5630e
Β·
verified Β·
1 Parent(s): 39d3f04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -125,7 +125,7 @@ def CTXGen(Ο„, g_num, length_range, model_name, seed):
125
  cls_probability = cls_probability[0].item()
126
  act_probability = act_probability[0].item()
127
  generated_seq = generated_seq[generated_seq.index('[MASK]') + 2:generated_seq.index('[SEP]')]
128
- print(generated_seq)
129
  if generated_seq.count('C') % 2 == 0 and len("".join(generated_seq)) == gen_len:
130
  generated_seqs.append("".join(generated_seq))
131
  if "".join(generated_seq) not in train_seq and "".join(generated_seq) not in generated_seqs[0:-1] and all(x not in NON_AA for x in generated_seq):
@@ -156,11 +156,11 @@ with gr.Blocks() as demo:
156
  gr.Markdown("πŸ”— **[Optimization Generation](https://huggingface.co/spaces/oucgc1996/CTXGen_optimization_generation)**")
157
  gr.Markdown("# Conotoxin Unconstrained Generation")
158
  gr.Markdown("#### Input")
159
- gr.Markdown("βœ…**Ο„**: temperature factor controls the diversity of conotoxins generated. The higher the value, the higher the diversity")
160
  gr.Markdown("βœ…**Number of generations**: if it is not completed within 1200 seconds, it will automatically stop.")
161
- gr.Markdown("βœ…**Length range**: expected length range of conotoxins generated")
162
  gr.Markdown("βœ…**Model**: model parameters trained at different stages of data augmentation. Please refer to the paper for details.")
163
- gr.Markdown("βœ…**Seed**: Enter an integer as the random seed to ensure reproducible results. The default is random")
164
  with gr.Row():
165
  Ο„ = gr.Slider(minimum=1, maximum=2, step=0.1, label="Ο„")
166
  g_num = gr.Dropdown(choices=[1, 10, 20, 30, 40, 50], label="Number of generations")
 
125
  cls_probability = cls_probability[0].item()
126
  act_probability = act_probability[0].item()
127
  generated_seq = generated_seq[generated_seq.index('[MASK]') + 2:generated_seq.index('[SEP]')]
128
+
129
  if generated_seq.count('C') % 2 == 0 and len("".join(generated_seq)) == gen_len:
130
  generated_seqs.append("".join(generated_seq))
131
  if "".join(generated_seq) not in train_seq and "".join(generated_seq) not in generated_seqs[0:-1] and all(x not in NON_AA for x in generated_seq):
 
156
  gr.Markdown("πŸ”— **[Optimization Generation](https://huggingface.co/spaces/oucgc1996/CTXGen_optimization_generation)**")
157
  gr.Markdown("# Conotoxin Unconstrained Generation")
158
  gr.Markdown("#### Input")
159
+ gr.Markdown("βœ…**Ο„**: temperature factor controls the diversity of conotoxins generated. The higher the value, the higher the diversity.")
160
  gr.Markdown("βœ…**Number of generations**: if it is not completed within 1200 seconds, it will automatically stop.")
161
+ gr.Markdown("βœ…**Length range**: expected length range of conotoxins generated.")
162
  gr.Markdown("βœ…**Model**: model parameters trained at different stages of data augmentation. Please refer to the paper for details.")
163
+ gr.Markdown("βœ…**Seed**: enter an integer as the random seed to ensure reproducible results. The default is random.")
164
  with gr.Row():
165
  Ο„ = gr.Slider(minimum=1, maximum=2, step=0.1, label="Ο„")
166
  g_num = gr.Dropdown(choices=[1, 10, 20, 30, 40, 50], label="Number of generations")