Umranz commited on
Commit
cecd6ed
·
1 Parent(s): 4a9ecf3

Fix Gradio deprecation warning - move theme to launch() method

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -142,7 +142,7 @@ def predict_batch(emails_text, threshold):
142
  )
143
  return output
144
 
145
- with gr.Blocks(theme=gr.themes.Soft(), title="SpamShield AI") as demo:
146
 
147
  gr.Markdown("""
148
  # 🛡️ SpamShield AI — Email Spam Classifier
@@ -282,4 +282,4 @@ with gr.Blocks(theme=gr.themes.Soft(), title="SpamShield AI") as demo:
282
  > Always use proper email security tools in production.
283
  """)
284
 
285
- demo.launch()
 
142
  )
143
  return output
144
 
145
+ with gr.Blocks(title="SpamShield AI") as demo:
146
 
147
  gr.Markdown("""
148
  # 🛡️ SpamShield AI — Email Spam Classifier
 
282
  > Always use proper email security tools in production.
283
  """)
284
 
285
+ demo.launch(theme=gr.themes.Soft())