kaisex commited on
Commit
765e2ba
·
verified ·
1 Parent(s): 82ebcef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -1
app.py CHANGED
@@ -54,15 +54,37 @@ def predict(image, model_type):
54
  # Custom glow box CSS
55
  custom_css = """
56
  .result-box {
 
57
  background-color: black;
58
  padding: 20px;
59
  border-radius: 12px;
60
- box-shadow: 0 0 20px oklch(0.718 0.202 349.761);
61
  color: white;
62
  font-size: 1.2rem;
63
  text-align: center;
64
  font-weight: bold;
65
  width: 100%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
 
68
  .disclaimer {
@@ -79,6 +101,7 @@ custom_css = """
79
  }
80
  """
81
 
 
82
  # Gradio UI
83
  with gr.Blocks(css=custom_css) as demo:
84
  gr.Markdown("## NSFW Detector (Human and Anime/Cartoon)")
 
54
  # Custom glow box CSS
55
  custom_css = """
56
  .result-box {
57
+ position: relative;
58
  background-color: black;
59
  padding: 20px;
60
  border-radius: 12px;
 
61
  color: white;
62
  font-size: 1.2rem;
63
  text-align: center;
64
  font-weight: bold;
65
  width: 100%;
66
+ z-index: 1;
67
+ overflow: hidden;
68
+ box-shadow: 0 0 15px oklch(0.718 0.202 349.761);
69
+ }
70
+
71
+ .result-box::before {
72
+ content: "";
73
+ position: absolute;
74
+ top: -4px;
75
+ left: -4px;
76
+ right: -4px;
77
+ bottom: -4px;
78
+ background: conic-gradient(from 0deg, oklch(0.718 0.202 349.761), transparent 40%, oklch(0.718 0.202 349.761));
79
+ border-radius: 16px;
80
+ animation: spin 3s linear infinite;
81
+ z-index: -1;
82
+ filter: blur(8px);
83
+ }
84
+
85
+ @keyframes spin {
86
+ 0% { transform: rotate(0deg); }
87
+ 100% { transform: rotate(360deg); }
88
  }
89
 
90
  .disclaimer {
 
101
  }
102
  """
103
 
104
+
105
  # Gradio UI
106
  with gr.Blocks(css=custom_css) as demo:
107
  gr.Markdown("## NSFW Detector (Human and Anime/Cartoon)")