oceansweep commited on
Commit
4dee2ff
·
verified ·
1 Parent(s): 0e3a413

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -353,7 +353,7 @@ def process_local_file(file_path):
353
  def process_url(input_path, num_speakers=2, whisper_model="small.en", offset=0, api_name=None, api_key=None, vad_filter=False, download_video_flag=False, demo_mode=True):
354
  if demo_mode:
355
  api_name = "huggingface"
356
- api_key = os.environ.get("HF_TOKEN")
357
  print("HUGGINGFACE API KEY CHECK #3: " + api_key)
358
  vad_filter = False
359
  download_video_flag = False
@@ -1194,7 +1194,7 @@ def summarize_with_huggingface(api_key, file_path):
1194
  time.sleep(wait_time)
1195
 
1196
  if api_key == "":
1197
- api_key = os.environ.get("HF_TOKEN")
1198
  logging.debug("HUGGINGFACE API KEY CHECK: " + api_key)
1199
  try:
1200
  logging.debug("huggingface: Loading json data for summarization")
@@ -1204,7 +1204,7 @@ def summarize_with_huggingface(api_key, file_path):
1204
  logging.debug("huggingface: Extracting text from the segments")
1205
  text = ' '.join([segment['text'] for segment in segments])
1206
 
1207
- api_key = os.environ.get('HF_TOKEN')
1208
  logging.debug("HUGGINGFACE API KEY CHECK #2: " + api_key)
1209
 
1210
 
 
353
  def process_url(input_path, num_speakers=2, whisper_model="small.en", offset=0, api_name=None, api_key=None, vad_filter=False, download_video_flag=False, demo_mode=True):
354
  if demo_mode:
355
  api_name = "huggingface"
356
+ api_key = os.environ.get(HF_TOKEN)
357
  print("HUGGINGFACE API KEY CHECK #3: " + api_key)
358
  vad_filter = False
359
  download_video_flag = False
 
1194
  time.sleep(wait_time)
1195
 
1196
  if api_key == "":
1197
+ api_key = os.environ.get(HF_TOKEN)
1198
  logging.debug("HUGGINGFACE API KEY CHECK: " + api_key)
1199
  try:
1200
  logging.debug("huggingface: Loading json data for summarization")
 
1204
  logging.debug("huggingface: Extracting text from the segments")
1205
  text = ' '.join([segment['text'] for segment in segments])
1206
 
1207
+ api_key = os.environ.get(HF_TOKEN)
1208
  logging.debug("HUGGINGFACE API KEY CHECK #2: " + api_key)
1209
 
1210