Spaces:
Runtime error
Runtime error
Use token envvar
Browse files
app.py
CHANGED
@@ -1,8 +1,12 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
from transformers import pipeline
|
4 |
|
5 |
-
|
|
|
|
|
|
|
6 |
id2label = {
|
7 |
'LABEL_0': 'not ai traffic',
|
8 |
'LABEL_1': 'suspected ai traffic'
|
|
|
1 |
import gradio as gr
|
2 |
+
import os
|
3 |
|
4 |
from transformers import pipeline
|
5 |
|
6 |
+
|
7 |
+
auth_token = os.environ.get("HF_ACCESS_TOKEN") or True
|
8 |
+
|
9 |
+
pipe = pipeline(model="fmops/ai-traffic-classifier", use_auth_token=auth_token)
|
10 |
id2label = {
|
11 |
'LABEL_0': 'not ai traffic',
|
12 |
'LABEL_1': 'suspected ai traffic'
|