Spaces:
Runtime error
Runtime error
Commit
·
79d935d
1
Parent(s):
44ba05f
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ model = load_model()
|
|
17 |
|
18 |
#prompts
|
19 |
st.title("Writing Assistant for you 🦄")
|
20 |
-
image = Image.open('grammar.jpg').resize((1000,
|
21 |
st.image(image, caption='Sunrise by the mountains')
|
22 |
st.subheader("Some examples: ")
|
23 |
example_1 = st.button("I am write on AI")
|
@@ -31,11 +31,13 @@ button = st.button('Detect grammar mistakes:')
|
|
31 |
if example_1:
|
32 |
with st.spinner('In progress.......'):
|
33 |
output_text = model("I am write on AI")[0]["generated_text"]
|
34 |
-
st.markdown("
|
35 |
|
36 |
if example_2:
|
37 |
-
|
|
|
38 |
st.markdown("**"+output_text+"**")
|
39 |
if button:
|
40 |
-
|
|
|
41 |
st.markdown("**"+output_text+"**")
|
|
|
17 |
|
18 |
#prompts
|
19 |
st.title("Writing Assistant for you 🦄")
|
20 |
+
image = Image.open('grammar.jpg').resize((1000,300))
|
21 |
st.image(image, caption='Sunrise by the mountains')
|
22 |
st.subheader("Some examples: ")
|
23 |
example_1 = st.button("I am write on AI")
|
|
|
31 |
if example_1:
|
32 |
with st.spinner('In progress.......'):
|
33 |
output_text = model("I am write on AI")[0]["generated_text"]
|
34 |
+
st.markdown("## "+output_text)
|
35 |
|
36 |
if example_2:
|
37 |
+
with st.spinner('In progress.......'):
|
38 |
+
output_text = model("This sentence has, bads grammar mistake!")[0]["generated_text"]
|
39 |
st.markdown("**"+output_text+"**")
|
40 |
if button:
|
41 |
+
with st.spinner('In progress.......'):
|
42 |
+
output_text = model(textbox)[0]["generated_text"]
|
43 |
st.markdown("**"+output_text+"**")
|