Jipski commited on
Commit
b4316c5
1 Parent(s): 195e9be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -22,11 +22,14 @@ def infer(input_ids, max_length, temperature, top_k, top_p, num_return_sequences
22
  )
23
  return output_sequences
24
 
 
 
 
25
  default_value = "Jetzt tippen!"
26
  #prompts
27
  st.title("Flos gpt-2")
28
  #st.write("The almighty king of text generation, GPT-2 comes in four available sizes, only three of which have been publicly made available. Feared for its fake news generation capabilities, it currently stands as the most syntactically coherent model. A direct successor to the original GPT, it reinforces the already established pre-training/fine-tuning killer duo. From the paper: Language Models are Unsupervised Multitask Learners by Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei and Ilya Sutskever.")
29
- sent = st.text_area("Text", default_value, height = 275)
30
  max_length = st.sidebar.slider("Max Length", min_value = 10, max_value=30)
31
  temperature = st.sidebar.slider("Temperature", value = 1.0, min_value = 0.0, max_value=1.0, step=0.05)
32
  top_k = st.sidebar.slider("Top-k", min_value = 0, max_value=5, value = 0)
 
22
  )
23
  return output_sequences
24
 
25
+ def update_showing():
26
+ st.session_state.showing = gen
27
+
28
  default_value = "Jetzt tippen!"
29
  #prompts
30
  st.title("Flos gpt-2")
31
  #st.write("The almighty king of text generation, GPT-2 comes in four available sizes, only three of which have been publicly made available. Feared for its fake news generation capabilities, it currently stands as the most syntactically coherent model. A direct successor to the original GPT, it reinforces the already established pre-training/fine-tuning killer duo. From the paper: Language Models are Unsupervised Multitask Learners by Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei and Ilya Sutskever.")
32
+ sent = st.text_area("Text", default_value, key='showing', height = 275, onchange=update_showing)
33
  max_length = st.sidebar.slider("Max Length", min_value = 10, max_value=30)
34
  temperature = st.sidebar.slider("Temperature", value = 1.0, min_value = 0.0, max_value=1.0, step=0.05)
35
  top_k = st.sidebar.slider("Top-k", min_value = 0, max_value=5, value = 0)