kaisex commited on
Commit
82ebcef
·
verified ·
1 Parent(s): 221ee1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -14
app.py CHANGED
@@ -54,24 +54,36 @@ def predict(image, model_type):
54
  # Custom glow box CSS
55
  custom_css = """
56
  .result-box {
57
- background-color: black; /* dark inside */
58
  padding: 20px;
59
  border-radius: 12px;
60
- box-shadow: 0 0 20px oklch(0.718 0.202 349.761); /* outer glow only */
61
  color: white;
62
  font-size: 1.2rem;
63
  text-align: center;
64
  font-weight: bold;
65
  width: 100%;
66
  }
67
- .gradio-container { max-width: 900px; margin: auto; }
 
 
 
 
 
 
 
 
 
 
 
 
68
  """
69
 
70
  # Gradio UI
71
  with gr.Blocks(css=custom_css) as demo:
72
  gr.Markdown("## NSFW Detector (Human and Anime/Cartoon)")
73
  gr.Markdown(
74
- "Upload an img and select the appropriate model. The system will detect whether the content is NSFW or SFW. "
75
  )
76
 
77
  with gr.Row():
@@ -84,18 +96,10 @@ with gr.Blocks(css=custom_css) as demo:
84
  image_input.change(fn=predict, inputs=[image_input, model_choice], outputs=output_box)
85
  model_choice.change(fn=predict, inputs=[image_input, model_choice], outputs=output_box)
86
 
87
- gr.Markdown(
 
88
  "<div class='disclaimer'>This is a side project. Results are not guaranteed. No images are stored.</div>"
89
  )
90
- .disclaimer {
91
- color: white;
92
- font-size: 0.9rem;
93
- text-align: center;
94
- margin-top: 40px;
95
- text-shadow: 0 0 10px oklch(0.718 0.202 349.761); /* soft outer glow */
96
- }
97
-
98
-
99
 
100
  if __name__ == "__main__":
101
  demo.launch()
 
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 {
69
+ color: white;
70
+ font-size: 0.9rem;
71
+ text-align: center;
72
+ margin-top: 40px;
73
+ text-shadow: 0 0 10px oklch(0.718 0.202 349.761);
74
+ }
75
+
76
+ .gradio-container {
77
+ max-width: 900px;
78
+ margin: auto;
79
+ }
80
  """
81
 
82
  # Gradio UI
83
  with gr.Blocks(css=custom_css) as demo:
84
  gr.Markdown("## NSFW Detector (Human and Anime/Cartoon)")
85
  gr.Markdown(
86
+ "Upload an img and select the appropriate model. The system will detect whether the content is NSFW or SFW."
87
  )
88
 
89
  with gr.Row():
 
96
  image_input.change(fn=predict, inputs=[image_input, model_choice], outputs=output_box)
97
  model_choice.change(fn=predict, inputs=[image_input, model_choice], outputs=output_box)
98
 
99
+ # Disclaimer with glow
100
+ gr.Markdown(
101
  "<div class='disclaimer'>This is a side project. Results are not guaranteed. No images are stored.</div>"
102
  )
 
 
 
 
 
 
 
 
 
103
 
104
  if __name__ == "__main__":
105
  demo.launch()