freemt commited on
Commit
aeb2033
2 Parent(s): 52a9494 3981243

Update loadtext.py requirements.txt

Browse files
radiobee/__main__.py CHANGED
@@ -109,6 +109,7 @@ if __name__ == "__main__":
109
  server_name = "0.0.0.0"
110
  debug = False
111
  debug = True
 
112
  share = True
113
 
114
  # set UTC+8, probably wont work in hf spaces, no permission
@@ -116,6 +117,9 @@ if __name__ == "__main__":
116
  sp.check_output(shlex.split("ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime"))
117
  except Exception as exc:
118
  logger.error(" set timezonef failed: %s", exc)
 
 
 
119
  else:
120
  server_name = "127.0.0.1"
121
  share = False
@@ -485,7 +489,7 @@ if __name__ == "__main__":
485
  # theme="darkgrass",
486
  theme="grass",
487
  layout="vertical", # horizontal unaligned
488
- allow_flagging="manual", # "auto"
489
  flagging_options=[
490
  "fatal",
491
  "bug",
@@ -493,7 +497,7 @@ if __name__ == "__main__":
493
  "excelsior",
494
  ], # "paragon"],
495
  css=f"{css_image} {css_input_file} {css_output_file}",
496
- enable_queue=True,
497
  )
498
 
499
  iface.launch(
 
109
  server_name = "0.0.0.0"
110
  debug = False
111
  debug = True
112
+ <<<<<<< HEAD
113
  share = True
114
 
115
  # set UTC+8, probably wont work in hf spaces, no permission
 
117
  sp.check_output(shlex.split("ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime"))
118
  except Exception as exc:
119
  logger.error(" set timezonef failed: %s", exc)
120
+ =======
121
+ share = False
122
+ >>>>>>> refs/remotes/origin/main
123
  else:
124
  server_name = "127.0.0.1"
125
  share = False
 
489
  # theme="darkgrass",
490
  theme="grass",
491
  layout="vertical", # horizontal unaligned
492
+ allow_flagging="never", # "auto" "manual"
493
  flagging_options=[
494
  "fatal",
495
  "bug",
 
497
  "excelsior",
498
  ], # "paragon"],
499
  css=f"{css_image} {css_input_file} {css_output_file}",
500
+ # enable_queue=True,
501
  )
502
 
503
  iface.launch(
radiobee/align_sents.pyc CHANGED
Binary files a/radiobee/align_sents.pyc and b/radiobee/align_sents.pyc differ
 
radiobee/loadtext.py CHANGED
@@ -35,7 +35,7 @@ def loadtext(filepath: Union[Path, str] = "") -> str:
35
  if not filepath.is_file():
36
  logger.error(" file [%s] does not exist or is not a file.", filepath)
37
  # return None
38
- raise Exception(" file [{filepath}] does not exist or is not a file.")
39
 
40
  # encoding = detect_file(filepath)
41
  encoding = cchardet.detect(filepath.read_bytes()).get("encoding", "utf8")
 
35
  if not filepath.is_file():
36
  logger.error(" file [%s] does not exist or is not a file.", filepath)
37
  # return None
38
+ raise Exception(f" file [{filepath}] does not exist or is not a file.")
39
 
40
  # encoding = detect_file(filepath)
41
  encoding = cchardet.detect(filepath.read_bytes()).get("encoding", "utf8")
requirements.txt CHANGED
@@ -23,6 +23,7 @@ pyicu
23
  pycld2
24
  tqdm
25
  polyglot
 
26
  sentence_splitter
27
  icecream
28
  # lazy
 
23
  pycld2
24
  tqdm
25
  polyglot
26
+ nltk
27
  sentence_splitter
28
  icecream
29
  # lazy