BigSalmon commited on
Commit
15f3d13
·
1 Parent(s): 9aa8502

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -19,6 +19,7 @@ def process(text: str,
19
  max_len: int,
20
  temp: float,
21
  top_k: int,
 
22
  top_p: float):
23
  payload = {
24
  "inputs": text,
@@ -27,6 +28,7 @@ def process(text: str,
27
  "top_k": top_k,
28
  "top_p": top_p,
29
  "temperature": temp,
 
30
  "repetition_penalty": 2.0,
31
  },
32
  "options": {
@@ -54,6 +56,11 @@ top_k = st.sidebar.text_input(
54
  value=50,
55
  help="The number of highest probability vocabulary tokens to keep for top-k-filtering."
56
  )
 
 
 
 
 
57
  top_p = st.sidebar.text_input(
58
  "Top p",
59
  value=0.95,
 
19
  max_len: int,
20
  temp: float,
21
  top_k: int,
22
+ num_return_sequences:int,
23
  top_p: float):
24
  payload = {
25
  "inputs": text,
 
28
  "top_k": top_k,
29
  "top_p": top_p,
30
  "temperature": temp,
31
+ "num_return_sequences": 10,
32
  "repetition_penalty": 2.0,
33
  },
34
  "options": {
 
56
  value=50,
57
  help="The number of highest probability vocabulary tokens to keep for top-k-filtering."
58
  )
59
+ num_return_sequences = st.sidebar.text_input(
60
+ "Returns",
61
+ value=5,
62
+ help="Number to return."
63
+ )
64
  top_p = st.sidebar.text_input(
65
  "Top p",
66
  value=0.95,