Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
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("\
|
|
|
|
|
123 |
st.text("English translation")
|
124 |
-
st.write(translate(result, "en", "pl").replace("\
|
|
|
|
|
|
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 |
+
"))
|