oceansweep commited on
Commit
7d17bca
1 Parent(s): 5d456da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -344,6 +344,7 @@ def process_url(input_path, num_speakers=2, whisper_model="small.en", offset=0,
344
  if demo_mode:
345
  api_name = "huggingface"
346
  api_key = os.environ.get("HF_TOKEN")
 
347
  vad_filter = False
348
  download_video_flag = False
349
 
@@ -1155,6 +1156,7 @@ def summarize_with_huggingface(api_key, file_path):
1155
  logging.debug(f"huggingface: Summarization process starting...")
1156
  if api_key == "":
1157
  api_key = os.environ.get("HF_TOKEN")
 
1158
  try:
1159
  logging.debug("huggingface: Loading json data for summarization")
1160
  with open(file_path, 'r') as file:
@@ -1164,6 +1166,7 @@ def summarize_with_huggingface(api_key, file_path):
1164
  text = ' '.join([segment['text'] for segment in segments])
1165
 
1166
  api_key = os.environ.get('HF_TOKEN')
 
1167
  headers = {
1168
  "Authorization": f"Bearer {api_key}"
1169
  }
@@ -1242,6 +1245,7 @@ def launch_ui(demo_mode=False):
1242
  title="Video Transcription and Summarization",
1243
  description="Submit a video URL for transcription and summarization.",
1244
  allow_flagging="never",
 
1245
  theme="bethecloud/storj_theme"
1246
  # FIXME - Figure out how to enable dark mode...
1247
  # other themes: https://huggingface.co/spaces/gradio/theme-gallery
 
344
  if demo_mode:
345
  api_name = "huggingface"
346
  api_key = os.environ.get("HF_TOKEN")
347
+ print("HUGGINGFACE API KEY CHECK #3: " + api_key)
348
  vad_filter = False
349
  download_video_flag = False
350
 
 
1156
  logging.debug(f"huggingface: Summarization process starting...")
1157
  if api_key == "":
1158
  api_key = os.environ.get("HF_TOKEN")
1159
+ print("HUGGINGFACE API KEY CHECK: " + api_key)
1160
  try:
1161
  logging.debug("huggingface: Loading json data for summarization")
1162
  with open(file_path, 'r') as file:
 
1166
  text = ' '.join([segment['text'] for segment in segments])
1167
 
1168
  api_key = os.environ.get('HF_TOKEN')
1169
+ print("HUGGINGFACE API KEY CHECK #2: " + api_key)
1170
  headers = {
1171
  "Authorization": f"Bearer {api_key}"
1172
  }
 
1245
  title="Video Transcription and Summarization",
1246
  description="Submit a video URL for transcription and summarization.",
1247
  allow_flagging="never",
1248
+ #https://huggingface.co/spaces/bethecloud/storj_theme
1249
  theme="bethecloud/storj_theme"
1250
  # FIXME - Figure out how to enable dark mode...
1251
  # other themes: https://huggingface.co/spaces/gradio/theme-gallery