Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,7 @@ st.markdown(
|
|
76 |
"""
|
77 |
This demo showcases the text generation capabilities for papuGaPT2, a GPT2 model pre-trained from scratch using Polish subset of the multilingual Oscar corpus.
|
78 |
|
79 |
-
To use it, add your text to '
|
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 |
|
@@ -119,10 +119,11 @@ if st.button("Run"):
|
|
119 |
st.write(f"{error}")
|
120 |
else:
|
121 |
result = result[0]["generated_text"]
|
122 |
-
st.write(result.replace("\
|
123 |
-
", " \
|
124 |
-
"))
|
|
|
125 |
st.text("English translation")
|
126 |
-
st.write(translate(result, "en", "
|
127 |
", " \
|
128 |
"))
|
|
|
76 |
"""
|
77 |
This demo showcases the text generation capabilities for papuGaPT2, a GPT2 model pre-trained from scratch using Polish subset of the multilingual Oscar corpus.
|
78 |
|
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 |
|
|
|
119 |
st.write(f"{error}")
|
120 |
else:
|
121 |
result = result[0]["generated_text"]
|
122 |
+
# st.write(result.replace("\
|
123 |
+
#", " \
|
124 |
+
#"))
|
125 |
+
st.write(result)
|
126 |
st.text("English translation")
|
127 |
+
st.write(translate(result, "en", "pl").replace("\
|
128 |
", " \
|
129 |
"))
|