fffiloni commited on
Commit
6c0447a
โ€ข
1 Parent(s): cd61c85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -13,6 +13,9 @@ 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
  img_to_text = gr.Blocks.load(name="spaces/fffiloni/CLIP-Interrogator-2")
18
 
@@ -32,7 +35,9 @@ from utils import get_tags_for_prompts, get_mubert_tags_embeddings, get_pat
32
  minilm = SentenceTransformer('all-MiniLM-L6-v2')
33
  mubert_tags_embeddings = get_mubert_tags_embeddings(minilm)
34
 
35
-
 
 
36
  def get_track_by_tags(tags, pat, duration, gen_intensity, gen_mode, maxit=20):
37
 
38
  r = httpx.post('https://api-b2b.mubert.com/v2/RecordTrackTTM',
 
13
  from os import path
14
  from pydub import AudioSegment
15
 
16
+ MUBERT_LICENSE = os.environ.get('MUBERT_LICENSE')
17
+ MUBERT_TOKEN = os.environ.get('MUBERT_TOKEN')
18
+
19
  #img_to_text = gr.Blocks.load(name="spaces/pharma/CLIP-Interrogator")
20
  img_to_text = gr.Blocks.load(name="spaces/fffiloni/CLIP-Interrogator-2")
21
 
 
35
  minilm = SentenceTransformer('all-MiniLM-L6-v2')
36
  mubert_tags_embeddings = get_mubert_tags_embeddings(minilm)
37
 
38
+ def get_pat_token():
39
+ return pat
40
+
41
  def get_track_by_tags(tags, pat, duration, gen_intensity, gen_mode, maxit=20):
42
 
43
  r = httpx.post('https://api-b2b.mubert.com/v2/RecordTrackTTM',