progs2002 commited on
Commit
6faa33e
·
1 Parent(s): a87d429

fixed sliders increased height of text input

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -22,17 +22,18 @@ RIKER: Who gave the command?
22
  DATA: Apparently no one. Helm and navigation controls are not functioning. Our speed is now warp seven-point-three and holding.
23
  PICARD: Picard to Engineering. Mister La Forge, what's going on down there?
24
  """
25
- text = st.text_area("First few lines of the script:", demo_text)
26
 
27
  col1, col2 = st.columns(2)
28
 
29
  with col1:
30
- temp = st.slider('Temperature', 0, 1, 1)
31
  max_len = st.number_input('Max length', min_value=1, max_value=2048, value=512)
32
 
33
  with col2:
34
- top_p = st.slider('p', 0, 1, 0.95)
35
- top_k = st.slider('k', 1, 100, 50)
36
 
37
- with st.spinner("Generating text..."):
38
- stx.scrollableTextbox(llm.generate(text, max_len, temp, top_k, top_p), height=400)
 
 
22
  DATA: Apparently no one. Helm and navigation controls are not functioning. Our speed is now warp seven-point-three and holding.
23
  PICARD: Picard to Engineering. Mister La Forge, what's going on down there?
24
  """
25
+ text = st.text_area("First few lines of the script:", demo_text, height=300)
26
 
27
  col1, col2 = st.columns(2)
28
 
29
  with col1:
30
+ temp = st.slider('Temperature', 0.0, 1.0, 1.0, 0.1)
31
  max_len = st.number_input('Max length', min_value=1, max_value=2048, value=512)
32
 
33
  with col2:
34
+ top_p = st.slider('p', 0.0, 1.0, 0.95, 0.1)
35
+ top_k = st.slider('k', 1, 100, 50, 5)
36
 
37
+ if st.button("Generate"):
38
+ with st.spinner("Generating text..."):
39
+ stx.scrollableTextbox(llm.generate(text, max_len, temp, top_k, top_p), height=400)