fffiloni commited on
Commit
b3c49d3
1 Parent(s): 2d61ea6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -6,6 +6,8 @@ import re
6
  from moviepy.editor import VideoFileClip
7
  from moviepy.audio.AudioClip import AudioClip
8
 
 
 
9
  def extract_audio(video_in):
10
  input_video = video_in
11
  output_audio = 'audio.wav'
@@ -63,7 +65,7 @@ def get_caption_from_kosmos(image_in):
63
  return truncated_caption
64
 
65
  def get_caption(image_in):
66
- client = Client("https://vikhyatk-moondream1.hf.space/")
67
  result = client.predict(
68
  image_in, # filepath in 'image' Image component
69
  "Describe precisely the image in one sentence.", # str in 'Question' Textbox component
 
6
  from moviepy.editor import VideoFileClip
7
  from moviepy.audio.AudioClip import AudioClip
8
 
9
+ hf_token = os.environ.get("HF_TKN")
10
+
11
  def extract_audio(video_in):
12
  input_video = video_in
13
  output_audio = 'audio.wav'
 
65
  return truncated_caption
66
 
67
  def get_caption(image_in):
68
+ client = Client("https://fffilon-moondream1.hf.space/", hf_token=hf_token)
69
  result = client.predict(
70
  image_in, # filepath in 'image' Image component
71
  "Describe precisely the image in one sentence.", # str in 'Question' Textbox component