Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ from inference import inference_patch
|
|
7 |
import datetime
|
8 |
import subprocess
|
9 |
import os
|
|
|
10 |
|
11 |
# Predefined valid combinations set
|
12 |
with open('prompts.txt', 'r') as f:
|
@@ -83,7 +84,7 @@ def save_and_convert(abc_content, period, composer, instrumentation):
|
|
83 |
return f"Saved successfully: {abc_filename} -> {xml_filename}"
|
84 |
|
85 |
|
86 |
-
|
87 |
def generate_music(period, composer, instrumentation):
|
88 |
if (period, composer, instrumentation) not in valid_combinations:
|
89 |
raise gr.Error("Invalid prompt combination! Please re-select from the period options")
|
|
|
7 |
import datetime
|
8 |
import subprocess
|
9 |
import os
|
10 |
+
import spaces
|
11 |
|
12 |
# Predefined valid combinations set
|
13 |
with open('prompts.txt', 'r') as f:
|
|
|
84 |
return f"Saved successfully: {abc_filename} -> {xml_filename}"
|
85 |
|
86 |
|
87 |
+
@spaces.GPU
|
88 |
def generate_music(period, composer, instrumentation):
|
89 |
if (period, composer, instrumentation) not in valid_combinations:
|
90 |
raise gr.Error("Invalid prompt combination! Please re-select from the period options")
|