Sylvain Filoni commited on
Commit
7c7eec0
โ€ข
1 Parent(s): 314e663

optimization

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -13,13 +13,15 @@ import urllib
13
  from os import path
14
  from pydub import AudioSegment
15
 
16
- img_to_text = gr.Blocks.load(name="spaces/pharma/CLIP-Interrogator")
 
17
 
18
  from share_btn import community_icon_html, loading_icon_html, share_js
19
 
20
  def get_prompts(uploaded_image, track_duration, gen_intensity):
21
  print("calling clip interrogator")
22
- prompt = img_to_text(uploaded_image, "ViT-L (best for Stable Diffusion 1.*)", "fast", fn_index=1)[0]
 
23
  print(prompt)
24
  music_result = generate_track_by_prompt(prompt, track_duration, gen_intensity)
25
  print(music_result)
 
13
  from os import path
14
  from pydub import AudioSegment
15
 
16
+ #img_to_text = gr.Blocks.load(name="spaces/pharma/CLIP-Interrogator")
17
+ img_to_text = gr.Blocks.load(name="spaces/fffiloni/CLIP-Interrogator-2")
18
 
19
  from share_btn import community_icon_html, loading_icon_html, share_js
20
 
21
  def get_prompts(uploaded_image, track_duration, gen_intensity):
22
  print("calling clip interrogator")
23
+ #prompt = img_to_text(uploaded_image, "ViT-L (best for Stable Diffusion 1.*)", "fast", fn_index=1)[0]
24
+ img_to_text(uploaded_image, 'fast', 4, fn_index=1)[0]
25
  print(prompt)
26
  music_result = generate_track_by_prompt(prompt, track_duration, gen_intensity)
27
  print(music_result)