Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -58,17 +58,23 @@ def main():
|
|
58 |
args = TTSettings(num_beams=5, min_length=1, max_length=1024)
|
59 |
|
60 |
default_text = "A dog is bigger then mouse."
|
61 |
-
default_text = "
|
62 |
input_text = st.text_area(
|
63 |
label="Original text",
|
64 |
value=default_text,
|
65 |
)
|
66 |
|
|
|
67 |
if st.button("βοΈ Check"):
|
68 |
start = time.time()
|
69 |
output(model, args, annotator, input_text)
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
|
74 |
if __name__ == "__main__":
|
|
|
58 |
args = TTSettings(num_beams=5, min_length=1, max_length=1024)
|
59 |
|
60 |
default_text = "A dog is bigger then mouse."
|
61 |
+
default_text = "it gives him many apprtunites in the life, and i think that being knowledge person is a very wouderful thing to have so we can spend our lives in a successful way and full of happenis."
|
62 |
input_text = st.text_area(
|
63 |
label="Original text",
|
64 |
value=default_text,
|
65 |
)
|
66 |
|
67 |
+
start = None
|
68 |
if st.button("βοΈ Check"):
|
69 |
start = time.time()
|
70 |
output(model, args, annotator, input_text)
|
71 |
+
|
72 |
+
st.write("---")
|
73 |
+
st.markdown(
|
74 |
+
f"Built by [@aseifert](https://twitter.com/therealaseifert) during the HF community event β [GitHub repo](https://github.com/aseifert/hf-writing-assistant) β Team Writing Assistant"
|
75 |
+
)
|
76 |
+
if start is not None:
|
77 |
+
st.text(f"prediction took {time.time() - start:.2f}s")
|
78 |
|
79 |
|
80 |
if __name__ == "__main__":
|