dungeon29 commited on
Commit
0763857
·
verified ·
1 Parent(s): 81d3e20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -163,7 +163,7 @@ def combine_predictions(url_probs, html_probs, url_weight=0.3, html_weight=0.7):
163
  # --------- Inference function ----------
164
  def predict_fn(text: str):
165
  if not text or not text.strip():
166
- return {"error": "Please enter a URL or text."}, ""
167
 
168
  # Check if input is URL
169
  if is_url(text.strip()):
 
163
  # --------- Inference function ----------
164
  def predict_fn(text: str):
165
  if not text or not text.strip():
166
+ return "<div style='color: red; padding: 20px; text-align: center;'>⚠️ Please enter a URL or text to analyze.</div>"
167
 
168
  # Check if input is URL
169
  if is_url(text.strip()):