Spaces:
Runtime error
Runtime error
thepolymerguy
commited on
Commit
•
b58be51
1
Parent(s):
94f6c5d
Update app.py
Browse files
app.py
CHANGED
@@ -37,11 +37,16 @@ model = LlamaForCausalLM.from_pretrained(
|
|
37 |
device_map='auto',
|
38 |
)
|
39 |
|
|
|
40 |
|
41 |
DATASET_REPO_URL = "https://huggingface.co/datasets/Claimed/logger"
|
42 |
DATA_FILENAME = "data.csv"
|
43 |
DATA_FILE = os.path.join("data", DATA_FILENAME)
|
44 |
|
|
|
|
|
|
|
|
|
45 |
def store_log():
|
46 |
with open(DATA_FILE, "a") as csvfile:
|
47 |
writer = csv.DictWriter(csvfile, fieldnames=["count", "time"])
|
|
|
37 |
device_map='auto',
|
38 |
)
|
39 |
|
40 |
+
HF_TOKEN = os.environ.get("AUTH_TOKEN_SECRET")
|
41 |
|
42 |
DATASET_REPO_URL = "https://huggingface.co/datasets/Claimed/logger"
|
43 |
DATA_FILENAME = "data.csv"
|
44 |
DATA_FILE = os.path.join("data", DATA_FILENAME)
|
45 |
|
46 |
+
repo = Repository(
|
47 |
+
local_dir="data", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN
|
48 |
+
)
|
49 |
+
|
50 |
def store_log():
|
51 |
with open(DATA_FILE, "a") as csvfile:
|
52 |
writer = csv.DictWriter(csvfile, fieldnames=["count", "time"])
|