Jofthomas HF staff commited on
Commit
37719d5
1 Parent(s): 099be6d

Update TextGen/suno.py

Browse files
Files changed (1) hide show
  1. TextGen/suno.py +9 -9
TextGen/suno.py CHANGED
@@ -5,52 +5,52 @@ import os
5
  base_url = os.environ["VERCEL_API"]
6
 
7
  def custom_generate_audio(payload):
8
- url = f"{base_url}/api/custom_generate"
9
  response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
10
  return response.json()
11
 
12
 
13
  def extend_audio(payload):
14
- url = f"{base_url}/api/extend_audio"
15
  response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
16
  return response.json()
17
 
18
  def generate_audio_by_prompt(payload):
19
- url = f"{base_url}/api/generate"
20
  response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
21
  return response.json()
22
 
23
 
24
  def get_audio_information(audio_ids):
25
- url = f"{base_url}/api/get?ids={audio_ids}"
26
  response = requests.get(url)
27
  return response.json()
28
 
29
 
30
  def generate_lyrics(payload):
31
- url = f"{base_url}/api/generate_lyrics"
32
  response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
33
  return response.json()
34
 
35
  def get_quota_information():
36
- url = f"{base_url}/api/get_limit"
37
  response = requests.get(url)
38
  return response.json()
39
 
40
  def get_clip(clip_id):
41
- url = f"{base_url}/api/clip?id={clip_id}"
42
  response = requests.get(url)
43
  return response.json()
44
 
45
  def generate_whole_song(clip_id):
46
  payloyd = {"clip_id": clip_id}
47
- url = f"{base_url}/api/concat"
48
  response = requests.post(url, json=payload)
49
  return response.json()
50
 
51
  def generate_lyrics(prompt):
52
  payload = {"prompt": prompt}
53
- url = f"{base_url}/api/generate_lyrics"
54
  print(url)
55
  response = requests.post(url, json=payload)
56
  print(response)
 
5
  base_url = os.environ["VERCEL_API"]
6
 
7
  def custom_generate_audio(payload):
8
+ url = f"{base_url}api/custom_generate"
9
  response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
10
  return response.json()
11
 
12
 
13
  def extend_audio(payload):
14
+ url = f"{base_url}api/extend_audio"
15
  response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
16
  return response.json()
17
 
18
  def generate_audio_by_prompt(payload):
19
+ url = f"{base_url}api/generate"
20
  response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
21
  return response.json()
22
 
23
 
24
  def get_audio_information(audio_ids):
25
+ url = f"{base_url}api/get?ids={audio_ids}"
26
  response = requests.get(url)
27
  return response.json()
28
 
29
 
30
  def generate_lyrics(payload):
31
+ url = f"{base_url}api/generate_lyrics"
32
  response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
33
  return response.json()
34
 
35
  def get_quota_information():
36
+ url = f"{base_url}api/get_limit"
37
  response = requests.get(url)
38
  return response.json()
39
 
40
  def get_clip(clip_id):
41
+ url = f"{base_url}api/clip?id={clip_id}"
42
  response = requests.get(url)
43
  return response.json()
44
 
45
  def generate_whole_song(clip_id):
46
  payloyd = {"clip_id": clip_id}
47
+ url = f"{base_url}api/concat"
48
  response = requests.post(url, json=payload)
49
  return response.json()
50
 
51
  def generate_lyrics(prompt):
52
  payload = {"prompt": prompt}
53
+ url = f"{base_url}api/generate_lyrics"
54
  print(url)
55
  response = requests.post(url, json=payload)
56
  print(response)