merve HF staff commited on
Commit
aad9f8c
1 Parent(s): c49515c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -20,7 +20,7 @@ def infer(input_ids, max_length, temperature, top_k, top_p, num_return_sequences
20
  top_k=top_k,
21
  top_p=top_p,
22
  do_sample=True,
23
- num_return_sequences=num_return_sequences,
24
  )
25
 
26
  return output_sequences
@@ -35,8 +35,6 @@ max_length = st.sidebar.slider("Max Length", min_value = 10, max_value=30)
35
  temperature = st.sidebar.slider("Temperature", value = 1.0, min_value = 0.0, max_value=1.0, step=0.05)
36
  top_k = st.sidebar.slider("Top-k", min_value = 0, max_value=5, value = 0)
37
  top_p = st.sidebar.slider("Top-p", min_value = 0.0, max_value=1.0, step = 0.05, value = 0.9)
38
- num_return_sequences = st.sidebar.number_input('Number of Return Sequences', min_value=1, max_value=5, value=1, step=1)
39
-
40
 
41
  encoded_prompt = tokenizer.encode(sent, add_special_tokens=False, return_tensors="pt")
42
  if encoded_prompt.size()[-1] == 0:
 
20
  top_k=top_k,
21
  top_p=top_p,
22
  do_sample=True,
23
+ num_return_sequences=1
24
  )
25
 
26
  return output_sequences
 
35
  temperature = st.sidebar.slider("Temperature", value = 1.0, min_value = 0.0, max_value=1.0, step=0.05)
36
  top_k = st.sidebar.slider("Top-k", min_value = 0, max_value=5, value = 0)
37
  top_p = st.sidebar.slider("Top-p", min_value = 0.0, max_value=1.0, step = 0.05, value = 0.9)
 
 
38
 
39
  encoded_prompt = tokenizer.encode(sent, add_special_tokens=False, return_tensors="pt")
40
  if encoded_prompt.size()[-1] == 0: