cspocketindia commited on
Commit
70c0af2
1 Parent(s): a5cbba4

Make logging non-blocking

Browse files
Files changed (1) hide show
  1. gradio_app.py +3 -2
gradio_app.py CHANGED
@@ -27,7 +27,8 @@ repo = huggingface_hub.Repository(
27
  )
28
 
29
  def log_record(vals):
30
- repo.git_pull(lfs=True)
 
31
 
32
  log_file = Path(dataset_dir) / "data.csv"
33
 
@@ -44,7 +45,7 @@ def log_record(vals):
44
  with open(log_file, "r", encoding="utf-8") as csvfile:
45
  line_count = len([None for _ in csv.reader(csvfile)]) - 1
46
 
47
- repo.push_to_hub(commit_message=f"Logged sample #{line_count}")
48
 
49
 
50
  def predict(sentence):
 
27
  )
28
 
29
  def log_record(vals):
30
+
31
+ repo.git_pull(lfs=False)
32
 
33
  log_file = Path(dataset_dir) / "data.csv"
34
 
 
45
  with open(log_file, "r", encoding="utf-8") as csvfile:
46
  line_count = len([None for _ in csv.reader(csvfile)]) - 1
47
 
48
+ repo.push_to_hub(commit_message=f"Logged sample #{line_count}",blocking=False)
49
 
50
 
51
  def predict(sentence):