janmariakowalski commited on
Commit
fccaf4f
·
verified ·
1 Parent(s): 673dada

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -60,10 +60,10 @@ else:
60
  logger.warning("LOGS_HF_TOKEN environment variable not set. Logging to Hugging Face Hub will be disabled.")
61
 
62
  def log_prediction(log_data: dict):
63
- logger.info("Logging to Hugging Face Hub...")
64
 
65
  if not api:
66
  return
 
67
 
68
  day = datetime.now().strftime("%Y-%m-%d")
69
  timestamp = log_data.get('timestamp', datetime.now().timestamp())
@@ -78,9 +78,9 @@ def log_prediction(log_data: dict):
78
  repo_type="dataset",
79
  commit_message="log prediction",
80
  token=LOGS_HF_TOKEN,
81
- run_as_future=True
82
  )
83
- #logger.info("Logging to Hugging Face Hub upload_file finished")
84
 
85
  except Exception as e:
86
  logger.error(f"Failed to log prediction to hub: {e}")
 
60
  logger.warning("LOGS_HF_TOKEN environment variable not set. Logging to Hugging Face Hub will be disabled.")
61
 
62
  def log_prediction(log_data: dict):
 
63
 
64
  if not api:
65
  return
66
+ logger.info("Logging to Hugging Face Hub...")
67
 
68
  day = datetime.now().strftime("%Y-%m-%d")
69
  timestamp = log_data.get('timestamp', datetime.now().timestamp())
 
78
  repo_type="dataset",
79
  commit_message="log prediction",
80
  token=LOGS_HF_TOKEN,
81
+ run_as_future=False
82
  )
83
+ logger.info("Logging to Hugging Face Hub upload_file finished")
84
 
85
  except Exception as e:
86
  logger.error(f"Failed to log prediction to hub: {e}")