Spaces:
Runtime error
Runtime error
update flagging token
Browse files
app.py
CHANGED
|
@@ -6,7 +6,8 @@ import gradio as gr
|
|
| 6 |
|
| 7 |
MODEL_PATH = "xiaopeiwu/hrw_v2"
|
| 8 |
auth_token = os.environ.get("TOKEN_FROM_SECRET")
|
| 9 |
-
|
|
|
|
| 10 |
model = DistilBertForSequenceClassification.from_pretrained(MODEL_PATH, use_auth_token=auth_token)
|
| 11 |
tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
|
| 12 |
|
|
|
|
| 6 |
|
| 7 |
MODEL_PATH = "xiaopeiwu/hrw_v2"
|
| 8 |
auth_token = os.environ.get("TOKEN_FROM_SECRET")
|
| 9 |
+
dataset_token = os.environ.get("DATASET_TOKEN")
|
| 10 |
+
hf_writer = gr.HuggingFaceDatasetSaver(dataset_token, "hrw_v2_test_flagged_data")
|
| 11 |
model = DistilBertForSequenceClassification.from_pretrained(MODEL_PATH, use_auth_token=auth_token)
|
| 12 |
tokenizer = DistilBertTokenizer.from_pretrained("distilbert-base-uncased")
|
| 13 |
|