miwojc commited on
Commit
c40429a
1 Parent(s): 2388c15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -79,10 +79,8 @@ st.markdown(
79
  To use it, add your text to 'Enter Text' box, or click one of the examples in 'Prompt' drop-down list to load them and clik 'Run' button. The model will generate text based on the entered text (prompt).
80
 
81
  For more information including dataset, training and evaluation procedure, intended use, limitations and bias analysis see the [model card](https://huggingface.co/flax-community/papuGaPT2)
82
-
83
- The models were trained with Jax and Flax using TPUs as part of the [Flax/Jax Community Week](https://discuss.huggingface.co/t/open-to-the-community-community-week-using-jax-flax-for-nlp-cv/7104) organised by HuggingFace.
84
-
85
- This demo is heavily inspired by the wonderful demo of [Spanish GPT2 demo](https://huggingface.co/spaces/flax-community/spanish-gpt2) especially María Grandury and Manuel Romero.
86
  """
87
  )
88
  model_name = MODEL_URL
@@ -119,6 +117,10 @@ if st.button("Run"):
119
  st.write(f"{error}")
120
  else:
121
  result = result[0]["generated_text"]
122
- st.write(result.replace("\n", " \n"))
 
 
123
  st.text("English translation")
124
- st.write(translate(result, "en", "pl").replace("\n", " \n"))
 
 
 
79
  To use it, add your text to 'Enter Text' box, or click one of the examples in 'Prompt' drop-down list to load them and clik 'Run' button. The model will generate text based on the entered text (prompt).
80
 
81
  For more information including dataset, training and evaluation procedure, intended use, limitations and bias analysis see the [model card](https://huggingface.co/flax-community/papuGaPT2)
82
+
83
+ In this demo, we used the template from the wonderful demo of [Spanish GPT2 demo](https://huggingface.co/spaces/flax-community/spanish-gpt2) especially María Grandury and Manuel Romero.
 
 
84
  """
85
  )
86
  model_name = MODEL_URL
 
117
  st.write(f"{error}")
118
  else:
119
  result = result[0]["generated_text"]
120
+ st.write(result.replace("\
121
+ ", " \
122
+ "))
123
  st.text("English translation")
124
+ st.write(translate(result, "en", "pl").replace("\
125
+ ", " \
126
+ "))