Spaces:
Sleeping
Sleeping
Disable logging
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ from threading import Thread
|
|
17 |
from queue import Queue
|
18 |
from time import sleep
|
19 |
from os import getenv
|
20 |
-
from data_logger import log_data
|
21 |
from datetime import datetime
|
22 |
|
23 |
def check_thread(logging_queue: Queue):
|
@@ -42,7 +42,7 @@ def check_thread(logging_queue: Queue):
|
|
42 |
logging_queue.put(item)
|
43 |
|
44 |
|
45 |
-
if getenv("HF_API_TOKEN") is not None:
|
46 |
#print("Starting logging thread...")
|
47 |
#log_queue = Queue()
|
48 |
#t = Thread(target=check_thread, args=(log_queue,))
|
@@ -84,7 +84,7 @@ def translate(input_text):
|
|
84 |
input_text = input_text.strip()
|
85 |
print(f"{datetime.utcnow()} | Translating: {input_text}")
|
86 |
|
87 |
-
if getenv("HF_API_TOKEN") is not None:
|
88 |
try:
|
89 |
logging_callback = log_data(
|
90 |
hf_token=getenv("HF_API_TOKEN"),
|
|
|
17 |
from queue import Queue
|
18 |
from time import sleep
|
19 |
from os import getenv
|
20 |
+
# from data_logger import log_data
|
21 |
from datetime import datetime
|
22 |
|
23 |
def check_thread(logging_queue: Queue):
|
|
|
42 |
logging_queue.put(item)
|
43 |
|
44 |
|
45 |
+
if False: #getenv("HF_API_TOKEN") is not None:
|
46 |
#print("Starting logging thread...")
|
47 |
#log_queue = Queue()
|
48 |
#t = Thread(target=check_thread, args=(log_queue,))
|
|
|
84 |
input_text = input_text.strip()
|
85 |
print(f"{datetime.utcnow()} | Translating: {input_text}")
|
86 |
|
87 |
+
if False: #getenv("HF_API_TOKEN") is not None:
|
88 |
try:
|
89 |
logging_callback = log_data(
|
90 |
hf_token=getenv("HF_API_TOKEN"),
|