Spaces:
Running
Running
SunilGopal
commited on
Commit
•
47703c3
1
Parent(s):
879fe12
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ class FileCleaner:
|
|
45 |
file_cleaner = FileCleaner()
|
46 |
|
47 |
|
48 |
-
def load_model(version='facebook/musicgen-
|
49 |
global MODEL
|
50 |
print("Loading model", version)
|
51 |
if MODEL is None or MODEL.name != version:
|
@@ -71,7 +71,7 @@ def _do_predictions(texts, duration):
|
|
71 |
|
72 |
|
73 |
def predict(text, duration):
|
74 |
-
load_model('facebook/musicgen-
|
75 |
wav_files = _do_predictions([text], duration)
|
76 |
return wav_files[0] # Return the first file in the list
|
77 |
|
|
|
45 |
file_cleaner = FileCleaner()
|
46 |
|
47 |
|
48 |
+
def load_model(version='facebook/musicgen-small'):
|
49 |
global MODEL
|
50 |
print("Loading model", version)
|
51 |
if MODEL is None or MODEL.name != version:
|
|
|
71 |
|
72 |
|
73 |
def predict(text, duration):
|
74 |
+
load_model('facebook/musicgen-small')
|
75 |
wav_files = _do_predictions([text], duration)
|
76 |
return wav_files[0] # Return the first file in the list
|
77 |
|