Spaces:
Running
Running
Commit
Β·
25dea08
1
Parent(s):
ec233d6
UI - theme
Browse files
app.py
CHANGED
|
@@ -49,26 +49,23 @@ def classify_text(text):
|
|
| 49 |
|
| 50 |
return result_message
|
| 51 |
|
| 52 |
-
title = "
|
| 53 |
-
description = """
|
| 54 |
-
|
| 55 |
-
---
|
| 56 |
|
| 57 |
-
|
| 58 |
|
| 59 |
-
- π€ - **Identify AI Models:** Reveals which LLM generated the text if detected as AI.
|
| 60 |
-
- β
- **Human Verification:** Marks human-written text with a green checkmark.
|
| 61 |
|
| 62 |
-
|
| 63 |
|
| 64 |
-
|
|
|
|
|
|
|
| 65 |
|
|
|
|
| 66 |
"""
|
| 67 |
|
| 68 |
-
bottom_text = "**
|
| 69 |
|
| 70 |
iface = gr.Blocks(css="""
|
| 71 |
-
|
| 72 |
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');
|
| 73 |
|
| 74 |
#text_input_box {
|
|
@@ -94,10 +91,10 @@ iface = gr.Blocks(css="""
|
|
| 94 |
margin: auto;
|
| 95 |
}
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
}
|
| 102 |
|
| 103 |
body {
|
|
@@ -107,8 +104,9 @@ iface = gr.Blocks(css="""
|
|
| 107 |
justify-content: center;
|
| 108 |
align-items: center;
|
| 109 |
height: 100vh;
|
| 110 |
-
|
| 111 |
}
|
|
|
|
| 112 |
.gradio-container {
|
| 113 |
border: 1px solid #4CAF50;
|
| 114 |
border-radius: 15px;
|
|
@@ -116,18 +114,15 @@ iface = gr.Blocks(css="""
|
|
| 116 |
box-shadow: 0px 0px 10px rgba(0,255,0,0.6);
|
| 117 |
max-width: 600px;
|
| 118 |
margin: auto;
|
| 119 |
-
overflow-y: auto;
|
| 120 |
}
|
|
|
|
| 121 |
h1 {
|
| 122 |
text-align: center;
|
| 123 |
-
font-size:
|
| 124 |
font-weight: bold;
|
| 125 |
-
|
| 126 |
-
}
|
| 127 |
-
h2 {
|
| 128 |
-
text-align: left;
|
| 129 |
-
font-size: 28px;
|
| 130 |
}
|
|
|
|
| 131 |
.highlight-human {
|
| 132 |
color: #4CAF50;
|
| 133 |
font-weight: bold;
|
|
@@ -135,6 +130,7 @@ iface = gr.Blocks(css="""
|
|
| 135 |
padding: 5px;
|
| 136 |
border-radius: 8px;
|
| 137 |
}
|
|
|
|
| 138 |
.highlight-ai {
|
| 139 |
color: #FF5733;
|
| 140 |
font-weight: bold;
|
|
@@ -142,15 +138,6 @@ iface = gr.Blocks(css="""
|
|
| 142 |
padding: 5px;
|
| 143 |
border-radius: 8px;
|
| 144 |
}
|
| 145 |
-
#bottom_text {
|
| 146 |
-
text-align: center;
|
| 147 |
-
margin-top: 50px;
|
| 148 |
-
font-weight: bold;
|
| 149 |
-
font-size: 20px;
|
| 150 |
-
}
|
| 151 |
-
.block.svelte-11xb1hd{
|
| 152 |
-
background: none !important;
|
| 153 |
-
}
|
| 154 |
""")
|
| 155 |
|
| 156 |
with iface:
|
|
|
|
| 49 |
|
| 50 |
return result_message
|
| 51 |
|
| 52 |
+
title = "AI Text Detector"
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
+
description = """
|
| 55 |
|
|
|
|
|
|
|
| 56 |
|
| 57 |
+
This tool uses the **ModernBERT** model to identify whether a given text was written by a human or generated by AI.
|
| 58 |
|
| 59 |
+
- π **Model Detection:** Can identify content from over 40 AI models.
|
| 60 |
+
- β
**Human Verification:** Human-written content is clearly marked.
|
| 61 |
+
- π **Accuracy:** Works best with longer texts for improved precision.
|
| 62 |
|
| 63 |
+
Paste your text below to analyze its origin.
|
| 64 |
"""
|
| 65 |
|
| 66 |
+
bottom_text = "**Developed by SzegedAI**"
|
| 67 |
|
| 68 |
iface = gr.Blocks(css="""
|
|
|
|
| 69 |
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');
|
| 70 |
|
| 71 |
#text_input_box {
|
|
|
|
| 91 |
margin: auto;
|
| 92 |
}
|
| 93 |
|
| 94 |
+
@media (max-width: 768px) {
|
| 95 |
+
#result_output_box {
|
| 96 |
+
width: 80%;
|
| 97 |
+
}
|
| 98 |
}
|
| 99 |
|
| 100 |
body {
|
|
|
|
| 104 |
justify-content: center;
|
| 105 |
align-items: center;
|
| 106 |
height: 100vh;
|
| 107 |
+
overflow-y: auto;
|
| 108 |
}
|
| 109 |
+
|
| 110 |
.gradio-container {
|
| 111 |
border: 1px solid #4CAF50;
|
| 112 |
border-radius: 15px;
|
|
|
|
| 114 |
box-shadow: 0px 0px 10px rgba(0,255,0,0.6);
|
| 115 |
max-width: 600px;
|
| 116 |
margin: auto;
|
|
|
|
| 117 |
}
|
| 118 |
+
|
| 119 |
h1 {
|
| 120 |
text-align: center;
|
| 121 |
+
font-size: 32px;
|
| 122 |
font-weight: bold;
|
| 123 |
+
margin-bottom: 30px;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
}
|
| 125 |
+
|
| 126 |
.highlight-human {
|
| 127 |
color: #4CAF50;
|
| 128 |
font-weight: bold;
|
|
|
|
| 130 |
padding: 5px;
|
| 131 |
border-radius: 8px;
|
| 132 |
}
|
| 133 |
+
|
| 134 |
.highlight-ai {
|
| 135 |
color: #FF5733;
|
| 136 |
font-weight: bold;
|
|
|
|
| 138 |
padding: 5px;
|
| 139 |
border-radius: 8px;
|
| 140 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
""")
|
| 142 |
|
| 143 |
with iface:
|