Spaces:
Running
on
Zero
Running
on
Zero
Yurii Paniv
commited on
Commit
·
084a0ab
1
Parent(s):
9a7ca97
Add logging callback for HF API token
Browse files
app.py
CHANGED
@@ -85,6 +85,11 @@ def translate(input_text):
|
|
85 |
|
86 |
if getenv("HF_API_TOKEN") is not None:
|
87 |
try:
|
|
|
|
|
|
|
|
|
|
|
88 |
logging_callback([input_text])
|
89 |
except:
|
90 |
print("Error happened while pushing data to HF.")
|
|
|
85 |
|
86 |
if getenv("HF_API_TOKEN") is not None:
|
87 |
try:
|
88 |
+
logging_callback = log_data(
|
89 |
+
hf_token=getenv("HF_API_TOKEN"),
|
90 |
+
dataset_name=getenv("OUTPUT_DATASET"),
|
91 |
+
private=True,
|
92 |
+
)
|
93 |
logging_callback([input_text])
|
94 |
except:
|
95 |
print("Error happened while pushing data to HF.")
|