Spaces:
Runtime error
Runtime error
Adding parameter setting on sidebar
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ with st.sidebar:
|
|
16 |
|
17 |
max_length = st.slider('Max text length', 0, 150, 80)
|
18 |
|
19 |
-
num_beams = st.slider('N° tree
|
20 |
|
21 |
early_stopping = st.selectbox(
|
22 |
'Early stopping text generation',
|
@@ -46,7 +46,7 @@ with col2:
|
|
46 |
|
47 |
gen = st.info('Generating text...')
|
48 |
answer = generator(prompt,
|
49 |
-
max_length=max_length,no_repeat_ngram_size=no_ngram_repeat,
|
50 |
early_stopping=early_stopping, num_beams=num_beams,
|
51 |
skip_special_tokens=True)
|
52 |
gen.empty()
|
|
|
16 |
|
17 |
max_length = st.slider('Max text length', 0, 150, 80)
|
18 |
|
19 |
+
num_beams = st.slider('N° tree beams search', 2, 15, 5)
|
20 |
|
21 |
early_stopping = st.selectbox(
|
22 |
'Early stopping text generation',
|
|
|
46 |
|
47 |
gen = st.info('Generating text...')
|
48 |
answer = generator(prompt,
|
49 |
+
max_length=max_length, no_repeat_ngram_size=no_ngram_repeat,
|
50 |
early_stopping=early_stopping, num_beams=num_beams,
|
51 |
skip_special_tokens=True)
|
52 |
gen.empty()
|