Spaces:
Sleeping
Sleeping
add css
Browse files
app.py
CHANGED
|
@@ -28,6 +28,9 @@ def moderation(input_text,api_key=openai_api_key):
|
|
| 28 |
title = "Smart content moderation"
|
| 29 |
description = "Check whether your content is potentially harmful."
|
| 30 |
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
demo = gr.Interface(
|
| 33 |
fn=moderation,
|
|
@@ -39,7 +42,15 @@ demo = gr.Interface(
|
|
| 39 |
gr.Label(label='Categories')
|
| 40 |
],
|
| 41 |
title = title,
|
| 42 |
-
description = description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
)
|
| 44 |
demo.queue(max_size = 20)
|
| 45 |
|
|
|
|
| 28 |
title = "Smart content moderation"
|
| 29 |
description = "Check whether your content is potentially harmful."
|
| 30 |
|
| 31 |
+
title_css = "text-align: center;"
|
| 32 |
+
desc_css = "text-align: center; color: gray;"
|
| 33 |
+
|
| 34 |
|
| 35 |
demo = gr.Interface(
|
| 36 |
fn=moderation,
|
|
|
|
| 42 |
gr.Label(label='Categories')
|
| 43 |
],
|
| 44 |
title = title,
|
| 45 |
+
description = description,
|
| 46 |
+
css=f"""
|
| 47 |
+
#header-title {{
|
| 48 |
+
{title_css}
|
| 49 |
+
}}
|
| 50 |
+
#header-description {{
|
| 51 |
+
{desc_css}
|
| 52 |
+
}}
|
| 53 |
+
"""
|
| 54 |
)
|
| 55 |
demo.queue(max_size = 20)
|
| 56 |
|