fffiloni commited on
Commit
09e56af
โ€ข
1 Parent(s): 2a4cc4c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -27,7 +27,7 @@ def get_prompts(uploaded_image, track_duration, gen_intensity, gen_mode):
27
  prompt = img_to_text(uploaded_image, 'fast', 4, fn_index=1)[0]
28
  print(prompt)
29
  pat = get_pat_token()
30
- #music_result = get_music(prompt, track_duration, gen_intensity, gen_mode)
31
  #music_result = generate_track_by_prompt(pat, prompt, track_duration, gen_intensity, gen_mode)
32
  #print(pat)
33
  return pat, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
@@ -55,7 +55,7 @@ def get_pat_token():
55
  #assert rdata['status'] == 1, "probably incorrect e-mail"
56
  #pat = rdata['data']['pat']
57
  print(rdata['data']['pat'])
58
- return "done"
59
 
60
  def get_music(prompt, track_duration, gen_intensity, gen_mode):
61
 
@@ -73,7 +73,7 @@ def get_music(prompt, track_duration, gen_intensity, gen_mode):
73
  })
74
 
75
  rdata = json.loads(r.text)
76
- print(rdata)
77
  #assert rdata['status'] == 1, "probably incorrect e-mail"
78
  #track = rdata['data']['tasks']['download_link']
79
 
 
27
  prompt = img_to_text(uploaded_image, 'fast', 4, fn_index=1)[0]
28
  print(prompt)
29
  pat = get_pat_token()
30
+ music_result = get_music(pat, prompt, track_duration, gen_intensity, gen_mode)
31
  #music_result = generate_track_by_prompt(pat, prompt, track_duration, gen_intensity, gen_mode)
32
  #print(pat)
33
  return pat, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
 
55
  #assert rdata['status'] == 1, "probably incorrect e-mail"
56
  #pat = rdata['data']['pat']
57
  print(rdata['data']['pat'])
58
+ return rdata['data']['pat']
59
 
60
  def get_music(prompt, track_duration, gen_intensity, gen_mode):
61
 
 
73
  })
74
 
75
  rdata = json.loads(r.text)
76
+ print(rdata['data'])
77
  #assert rdata['status'] == 1, "probably incorrect e-mail"
78
  #track = rdata['data']['tasks']['download_link']
79