Advik commited on
Commit
7748128
·
1 Parent(s): 9a481ab

fix logging msg & theme

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -122,11 +122,11 @@ def detect_ai_text(text):
122
  human_prob = 1 - ai_prob
123
 
124
  if ai_prob > 0.7:
125
- message = f"🤖 **HIGH CONFIDENCE**: AI-generated ({ai_prob:.1%})"
126
  elif ai_prob > 0.5:
127
- message = f"⚠️ **MODERATE CONFIDENCE**: Possibly AI-generated ({ai_prob:.1%})"
128
  else:
129
- message = f"✅ **LOW CONFIDENCE**: Human-written ({human_prob:.1%})"
130
 
131
  bar_data = pd.DataFrame({
132
  "Source": ["AI Generated", "Human Written"],
@@ -161,7 +161,7 @@ if torch.cuda.is_available():
161
 
162
 
163
  # Gradio app setup
164
- with gr.Blocks(title="DivEye") as demo:
165
  gr.HTML("""
166
  <div style="display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; background: #f0f4f8; border-radius: 12px; margin-bottom: 1rem;">
167
  <div style="text-align: left; max-width: 70%;">
 
122
  human_prob = 1 - ai_prob
123
 
124
  if ai_prob > 0.7:
125
+ message = f"🤖 **Likely AI-generated** (Confidence: {ai_prob:.2%})"
126
  elif ai_prob > 0.5:
127
+ message = f"⚠️ **Possibly AI-generated** (Confidence: {ai_prob:.2%})"
128
  else:
129
+ message = f"✅ **Likely Human-written** (Confidence: {human_prob:.2%})"
130
 
131
  bar_data = pd.DataFrame({
132
  "Source": ["AI Generated", "Human Written"],
 
161
 
162
 
163
  # Gradio app setup
164
+ with gr.Blocks(title="DivEye", theme=gr.themes.Soft()) as demo:
165
  gr.HTML("""
166
  <div style="display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; background: #f0f4f8; border-radius: 12px; margin-bottom: 1rem;">
167
  <div style="text-align: left; max-width: 70%;">