ZeeAI1 commited on
Commit
00b387e
·
verified ·
1 Parent(s): 0af0de7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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