Spaces:
Runtime error
Runtime error
Commit
·
72ef409
1
Parent(s):
8fb22c6
Update app.py
Browse files
app.py
CHANGED
@@ -16,12 +16,24 @@ model = load_model()
|
|
16 |
|
17 |
#prompts
|
18 |
st.title("Writing Assistant for you 🦄")
|
|
|
|
|
|
|
19 |
|
20 |
textbox = st.text_area('Write your text in this box:', '', height=200, max_chars=1000)
|
21 |
|
22 |
button = st.button('Detect grammar mistakes:')
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
if button:
|
25 |
output_text = model(textbox)[0]["generated_text]
|
26 |
|
27 |
-
st.write(output_text)
|
|
|
16 |
|
17 |
#prompts
|
18 |
st.title("Writing Assistant for you 🦄")
|
19 |
+
st.subheader("Some examples to try: ")
|
20 |
+
example_1 = st.button("I am write on AI")
|
21 |
+
example_2 = st.button("This sentence has, bads grammar mistake!")
|
22 |
|
23 |
textbox = st.text_area('Write your text in this box:', '', height=200, max_chars=1000)
|
24 |
|
25 |
button = st.button('Detect grammar mistakes:')
|
26 |
|
27 |
+
if example_1:
|
28 |
+
output_text = model("I am write on AI")[0]["generated_text]
|
29 |
+
st.write(**output_text**)
|
30 |
+
|
31 |
+
if example_2:
|
32 |
+
output_text = model("This sentence has, bads grammar mistake!")[0]["generated_text]
|
33 |
+
st.write(**output_text**)
|
34 |
+
|
35 |
+
|
36 |
if button:
|
37 |
output_text = model(textbox)[0]["generated_text]
|
38 |
|
39 |
+
st.write(**output_text**)
|