oceansweep commited on
Commit
5c31d66
·
verified ·
1 Parent(s): a61eef4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -1487,6 +1487,7 @@ def main(input_path, api_name=None, api_key=None, num_speakers=2, whisper_model=
1487
  except requests.exceptions.ConnectionError:
1488
  requests.status_code = "Connection: "
1489
  elif api_name.lower() == "huggingface":
 
1490
  huggingface_api_key = api_key if api_key else config.get('API', 'huggingface_api_key', fallback=None)
1491
  try:
1492
  logging.debug(f"MAIN: Trying to summarize with huggingface")
 
1487
  except requests.exceptions.ConnectionError:
1488
  requests.status_code = "Connection: "
1489
  elif api_name.lower() == "huggingface":
1490
+ api_key = os.environ.get(HF_TOKEN)
1491
  huggingface_api_key = api_key if api_key else config.get('API', 'huggingface_api_key', fallback=None)
1492
  try:
1493
  logging.debug(f"MAIN: Trying to summarize with huggingface")