Spaces:
Sleeping
Sleeping
Commit
•
fd4d6cb
1
Parent(s):
0185a8c
add language env var
Browse files- feedback.py +4 -1
feedback.py
CHANGED
@@ -1,16 +1,19 @@
|
|
1 |
import json
|
|
|
2 |
import uuid
|
3 |
from pathlib import Path
|
4 |
|
5 |
from huggingface_hub import CommitScheduler
|
6 |
|
|
|
|
|
7 |
APP_INSTANCE_ID = str(uuid.uuid4())
|
8 |
|
9 |
feedback_file = Path("user_feedback/") / f"data_{APP_INSTANCE_ID}.json"
|
10 |
feedback_folder = feedback_file.parent
|
11 |
|
12 |
scheduler = CommitScheduler(
|
13 |
-
repo_id="
|
14 |
repo_type="dataset",
|
15 |
folder_path=feedback_folder,
|
16 |
path_in_repo="data",
|
|
|
1 |
import json
|
2 |
+
import os
|
3 |
import uuid
|
4 |
from pathlib import Path
|
5 |
|
6 |
from huggingface_hub import CommitScheduler
|
7 |
|
8 |
+
LANGUAGE = os.environ["LANGUAGE"]
|
9 |
+
|
10 |
APP_INSTANCE_ID = str(uuid.uuid4())
|
11 |
|
12 |
feedback_file = Path("user_feedback/") / f"data_{APP_INSTANCE_ID}.json"
|
13 |
feedback_folder = feedback_file.parent
|
14 |
|
15 |
scheduler = CommitScheduler(
|
16 |
+
repo_id=f"feel-fl/open-human-feedback-chat-{LANGUAGE}",
|
17 |
repo_type="dataset",
|
18 |
folder_path=feedback_folder,
|
19 |
path_in_repo="data",
|