Spaces:
Running
Running
bitliu
commited on
Commit
·
ebe7362
1
Parent(s):
ca9429f
init
Browse filesSigned-off-by: bitliu <[email protected]>
- app.py +13 -34
- requirements.txt +2 -2
app.py
CHANGED
|
@@ -175,31 +175,15 @@ EXAMPLES_PII = [
|
|
| 175 |
]
|
| 176 |
|
| 177 |
# ============== Gradio Interface ==============
|
| 178 |
-
|
| 179 |
-
.
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
display: flex;
|
| 184 |
-
align-items: center;
|
| 185 |
-
gap: 20px;
|
| 186 |
-
margin-bottom: 10px;
|
| 187 |
-
}
|
| 188 |
-
.header-logo img {
|
| 189 |
-
height: 50px;
|
| 190 |
-
}
|
| 191 |
-
"""
|
| 192 |
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
container=False, show_download_button=False)
|
| 197 |
-
gr.Markdown(
|
| 198 |
-
"""
|
| 199 |
-
# 🚀 LLM Semantic Router
|
| 200 |
-
**Model Playground** - ModernBERT Classifiers for LLM Safety & Routing
|
| 201 |
-
"""
|
| 202 |
-
)
|
| 203 |
|
| 204 |
with gr.Tabs():
|
| 205 |
# Tab 1: Fact Check
|
|
@@ -272,17 +256,12 @@ with gr.Blocks(title="LLM Semantic Router - Model Playground", css=custom_css) a
|
|
| 272 |
ner_btn.click(classify_tokens, ner_input, [ner_output, ner_highlight])
|
| 273 |
ner_input.submit(classify_tokens, ner_input, [ner_output, ner_highlight])
|
| 274 |
|
| 275 |
-
gr.
|
| 276 |
"""
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
<strong>Architecture</strong>: ModernBERT |
|
| 282 |
-
<strong>GitHub</strong>: <a href="https://github.com/vllm-project/semantic-router" target="_blank">vllm-project/semantic-router</a>
|
| 283 |
-
</p>
|
| 284 |
-
<p>Part of the <a href="https://github.com/vllm-project/vllm" target="_blank">vLLM</a> ecosystem</p>
|
| 285 |
-
</div>
|
| 286 |
"""
|
| 287 |
)
|
| 288 |
|
|
|
|
| 175 |
]
|
| 176 |
|
| 177 |
# ============== Gradio Interface ==============
|
| 178 |
+
with gr.Blocks() as demo:
|
| 179 |
+
gr.Markdown(
|
| 180 |
+
"""
|
| 181 |
+
# 🚀 LLM Semantic Router - Model Playground
|
| 182 |
+
**ModernBERT Classifiers for LLM Safety & Routing**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 183 |
|
| 184 |
+
Part of the [vLLM](https://github.com/vllm-project/vllm) ecosystem
|
| 185 |
+
"""
|
| 186 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
|
| 188 |
with gr.Tabs():
|
| 189 |
# Tab 1: Fact Check
|
|
|
|
| 256 |
ner_btn.click(classify_tokens, ner_input, [ner_output, ner_highlight])
|
| 257 |
ner_input.submit(classify_tokens, ner_input, [ner_output, ner_highlight])
|
| 258 |
|
| 259 |
+
gr.Markdown(
|
| 260 |
"""
|
| 261 |
+
---
|
| 262 |
+
**Models**: [LLM-Semantic-Router](https://huggingface.co/LLM-Semantic-Router) |
|
| 263 |
+
**Architecture**: ModernBERT |
|
| 264 |
+
**GitHub**: [vllm-project/semantic-router](https://github.com/vllm-project/semantic-router)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
"""
|
| 266 |
)
|
| 267 |
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
torch
|
| 2 |
-
transformers>=4.
|
| 3 |
-
gradio
|
| 4 |
|
|
|
|
| 1 |
torch
|
| 2 |
+
transformers>=4.36.0
|
| 3 |
+
gradio
|
| 4 |
|