Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,9 @@ import streamlit as st
|
|
| 2 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
|
| 3 |
import torch
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
# Load grammar correction model
|
| 6 |
@st.cache_resource
|
| 7 |
def load_grammar_model():
|
|
@@ -37,7 +40,6 @@ def get_detailed_feedback(original, corrected):
|
|
| 37 |
return explanation
|
| 38 |
|
| 39 |
# Streamlit UI
|
| 40 |
-
st.set_page_config(page_title="Grammar Fixer & Coach", layout="centered")
|
| 41 |
st.title("🧠 Grammar Fixer & Writing Coach")
|
| 42 |
st.write("Paste your sentence or paragraph. The AI will correct it and explain each fix to help you learn.")
|
| 43 |
|
|
|
|
| 2 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
|
| 3 |
import torch
|
| 4 |
|
| 5 |
+
# ✅ Page config must be first
|
| 6 |
+
st.set_page_config(page_title="Grammar Fixer & Coach", layout="centered")
|
| 7 |
+
|
| 8 |
# Load grammar correction model
|
| 9 |
@st.cache_resource
|
| 10 |
def load_grammar_model():
|
|
|
|
| 40 |
return explanation
|
| 41 |
|
| 42 |
# Streamlit UI
|
|
|
|
| 43 |
st.title("🧠 Grammar Fixer & Writing Coach")
|
| 44 |
st.write("Paste your sentence or paragraph. The AI will correct it and explain each fix to help you learn.")
|
| 45 |
|