Momin Aziz commited on
Commit
9d0acc2
1 Parent(s): 357cad3

checking qa generator

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -25,10 +25,10 @@ default_value = "Nicejob has increased our revenue 80% since signing up"
25
  st.title("Question Generation")
26
  st.write("Placeholder for some other texts, like instructions...")
27
 
28
- sent = st.text_area("Text", default_value, height = 150)
29
- max_length = st.sidebar.slider("Max Length", min_value = 10, max_value=50)
30
  temperature = st.sidebar.slider("Temperature", value = 1.0, min_value = 0.0, max_value=1.0, step=0.05)
31
- num_return_sequences = st.sidebar.slider("Num Return Sequences", min_value = 1, max_value=4, value = 1)
32
  num_beams = st.sidebar.slider("Num Beams", min_value = 1, max_value=10, value = 4)
33
  top_k = st.sidebar.slider("Top-k", min_value = 0, max_value=100, value = 90)
34
  top_p = st.sidebar.slider("Top-p", min_value = 0.0, max_value=1.0, step = 0.05, value = 0.9)
@@ -39,4 +39,4 @@ output_sequences = run_model(sent, max_length=max_length,num_return_sequences=nu
39
  num_beams=num_beams,
40
  temperature=temperature, top_k=top_k, top_p=top_p)
41
 
42
- st.write('\n'.join(output_sequences))
 
25
  st.title("Question Generation")
26
  st.write("Placeholder for some other texts, like instructions...")
27
 
28
+ sent = st.text_area("Text", default_value, height = 100)
29
+ max_length = st.sidebar.slider("Max Length", min_value = 10, max_value=150,value=80,step=5)
30
  temperature = st.sidebar.slider("Temperature", value = 1.0, min_value = 0.0, max_value=1.0, step=0.05)
31
+ num_return_sequences = st.sidebar.slider("Num Return Sequences", min_value = 1, max_value=10, value = 2)
32
  num_beams = st.sidebar.slider("Num Beams", min_value = 1, max_value=10, value = 4)
33
  top_k = st.sidebar.slider("Top-k", min_value = 0, max_value=100, value = 90)
34
  top_p = st.sidebar.slider("Top-p", min_value = 0.0, max_value=1.0, step = 0.05, value = 0.9)
 
39
  num_beams=num_beams,
40
  temperature=temperature, top_k=top_k, top_p=top_p)
41
 
42
+ st.write(output_sequences)