sadgaj commited on
Commit
9d0f6a3
1 Parent(s): 2b734c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -10,6 +10,12 @@ def greet(name):
10
 
11
  # beam search
12
  molecules = model.generate(input_ids=sf_input["input_ids"],
 
 
 
 
 
 
13
  sf_output = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True).replace(" ","") for g in molecules]
14
  return sf_output
15
 
 
10
 
11
  # beam search
12
  molecules = model.generate(input_ids=sf_input["input_ids"],
13
+ attention_mask=sf_input["attention_mask"],
14
+ max_length=15,
15
+ min_length=5,
16
+ num_return_sequences=5,
17
+ num_beams=5)
18
+
19
  sf_output = [tokenizer.decode(g, skip_special_tokens=True, clean_up_tokenization_spaces=True).replace(" ","") for g in molecules]
20
  return sf_output
21