Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -74,13 +74,13 @@ do_sample = st.sidebar.selectbox(
|
|
74 |
# Body
|
75 |
st.markdown(
|
76 |
"""
|
77 |
-
This demo showcases the text generation capabilities
|
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
|
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
|
84 |
"""
|
85 |
)
|
86 |
model_name = MODEL_URL
|
@@ -117,10 +117,6 @@ if st.button("Run"):
|
|
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 |
-
"))
|
|
|
74 |
# Body
|
75 |
st.markdown(
|
76 |
"""
|
77 |
+
This demo showcases the text generation capabilities of the 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 click '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 team](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("\n", " \n"))
|
|
|
|
|
121 |
st.text("English translation")
|
122 |
+
st.write(translate(result, "en", "pl").replace("\n", " \n"))
|
|
|
|