Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -47,9 +47,10 @@ def get_caption(image_in):
|
|
47 |
|
48 |
def get_magnet(prompt):
|
49 |
amended_prompt = f"No Music. {prompt}"
|
|
|
50 |
client = Client("https://fffiloni-magnet.hf.space/--replicas/oo8sb/")
|
51 |
result = client.predict(
|
52 |
-
"facebook/magnet-small
|
53 |
"", # str in 'Model Path (custom models)' Textbox component
|
54 |
amended_prompt, # str in 'Input Text' Textbox component
|
55 |
3, # float in 'Temperature' Number component
|
@@ -67,9 +68,11 @@ def get_magnet(prompt):
|
|
67 |
return result[0]['video']
|
68 |
|
69 |
def get_audioldm(prompt):
|
|
|
|
|
70 |
client = Client("https://haoheliu-audioldm2-text2audio-text2music.hf.space/")
|
71 |
result = client.predict(
|
72 |
-
|
73 |
"Low quality. Music.", # str in 'Negative prompt' Textbox component
|
74 |
5, # int | float (numeric value between 5 and 15) in 'Duration (seconds)' Slider component
|
75 |
0, # int | float (numeric value between 0 and 7) in 'Guidance scale' Slider component
|
|
|
47 |
|
48 |
def get_magnet(prompt):
|
49 |
amended_prompt = f"No Music. {prompt}"
|
50 |
+
print(amended_prompt)
|
51 |
client = Client("https://fffiloni-magnet.hf.space/--replicas/oo8sb/")
|
52 |
result = client.predict(
|
53 |
+
"facebook/audio-magnet-small", # Literal['facebook/magnet-small-10secs', 'facebook/magnet-medium-10secs', 'facebook/magnet-small-30secs', 'facebook/magnet-medium-30secs', 'facebook/audio-magnet-small', 'facebook/audio-magnet-medium'] in 'Model' Radio component
|
54 |
"", # str in 'Model Path (custom models)' Textbox component
|
55 |
amended_prompt, # str in 'Input Text' Textbox component
|
56 |
3, # float in 'Temperature' Number component
|
|
|
68 |
return result[0]['video']
|
69 |
|
70 |
def get_audioldm(prompt):
|
71 |
+
amended_prompt = f"No Music. {prompt}"
|
72 |
+
print(amended_prompt)
|
73 |
client = Client("https://haoheliu-audioldm2-text2audio-text2music.hf.space/")
|
74 |
result = client.predict(
|
75 |
+
amended_prompt, # str in 'Input text' Textbox component
|
76 |
"Low quality. Music.", # str in 'Negative prompt' Textbox component
|
77 |
5, # int | float (numeric value between 5 and 15) in 'Duration (seconds)' Slider component
|
78 |
0, # int | float (numeric value between 0 and 7) in 'Guidance scale' Slider component
|