PierreBrunelle commited on
Commit
02ace09
·
verified ·
1 Parent(s): b991864

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
  import pixeltable as pxt
3
- from pixeltable.functions.huggingface import clip_image, clip_text
4
  from pixeltable.iterators import FrameIterator
5
  import PIL.Image
6
  import os
@@ -29,8 +29,8 @@ def process_video(video_file, progress=gr.Progress()):
29
  # Use separate methods for image and text embedding
30
  frames_view.add_embedding_index(
31
  'frame',
32
- image_embed=clip_image.using(model_id='openai/clip-vit-base-patch32'),
33
- string_embed=clip_text.using(model_id='openai/clip-vit-base-patch32')
34
  )
35
 
36
  progress(1.0, desc="Processing complete")
 
1
  import gradio as gr
2
  import pixeltable as pxt
3
+ from pixeltable.functions.huggingface import clip
4
  from pixeltable.iterators import FrameIterator
5
  import PIL.Image
6
  import os
 
29
  # Use separate methods for image and text embedding
30
  frames_view.add_embedding_index(
31
  'frame',
32
+ image_embed=clip.using(model_id='openai/clip-vit-base-patch32'),
33
+ string_embed=clip.using(model_id='openai/clip-vit-base-patch32')
34
  )
35
 
36
  progress(1.0, desc="Processing complete")