Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -23,6 +23,8 @@ except ImportError:
|
|
23 |
MODEL_PATH = os.getenv("MODEL_PATH", "speakleash/sojka2")
|
24 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
25 |
LABELS = ["self-harm", "hate", "vulgar", "sex", "crime"]
|
|
|
|
|
26 |
# Thresholds are now hardcoded
|
27 |
THRESHOLDS = {
|
28 |
"self-harm": 0.5,
|
@@ -163,8 +165,8 @@ with gr.Blocks(theme=theme, css=".gradio-container {max-width: 960px !important;
|
|
163 |
<h1 style="font-size: 1.5rem; font-weight: 600; margin: 0;">S脫JKA</h1>
|
164 |
</div>
|
165 |
<div style="display: flex; align-items: center; gap: 20px; font-size: 0.9rem;">
|
166 |
-
<a href="
|
167 |
-
<a href="
|
168 |
<button id="test-sojka-btn" class="gr-button gr-button-primary gr-button-lg"
|
169 |
style="background-color: var(--primary-500); color: white; padding: 8px 16px; border-radius: 8px;">
|
170 |
Testuj S贸jk臋
|
|
|
23 |
MODEL_PATH = os.getenv("MODEL_PATH", "speakleash/sojka2")
|
24 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
25 |
LABELS = ["self-harm", "hate", "vulgar", "sex", "crime"]
|
26 |
+
MAX_SEQ_LENGTH = 512
|
27 |
+
|
28 |
# Thresholds are now hardcoded
|
29 |
THRESHOLDS = {
|
30 |
"self-harm": 0.5,
|
|
|
165 |
<h1 style="font-size: 1.5rem; font-weight: 600; margin: 0;">S脫JKA</h1>
|
166 |
</div>
|
167 |
<div style="display: flex; align-items: center; gap: 20px; font-size: 0.9rem;">
|
168 |
+
<a href="https://sojka.m31ai.pl/projekt.html" target="blank" style="text-decoration: none; color: inherit;">O projekcie</a>
|
169 |
+
<a href="https://sojka.m31ai.pl/kategorie.html" target="blank" style="text-decoration: none; color: inherit;">Opis kategorii</a>
|
170 |
<button id="test-sojka-btn" class="gr-button gr-button-primary gr-button-lg"
|
171 |
style="background-color: var(--primary-500); color: white; padding: 8px 16px; border-radius: 8px;">
|
172 |
Testuj S贸jk臋
|