Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,8 +19,8 @@ def file_to_base64(filepath):
|
|
19 |
def submit_job(audio_file, preset, beat_sensitivity, fps, width, height):
|
20 |
# Check file size
|
21 |
file_size_mb = os.path.getsize(audio_file.name) / (1024 * 1024)
|
22 |
-
if file_size_mb > 3
|
23 |
-
raise gr.Error(f"File size is {file_size_mb:.2f}MB, which exceeds the
|
24 |
|
25 |
api_key = os.getenv('DEFORUM_API_KEY') # Ensure your environment variable is set
|
26 |
if not api_key:
|
|
|
19 |
def submit_job(audio_file, preset, beat_sensitivity, fps, width, height):
|
20 |
# Check file size
|
21 |
file_size_mb = os.path.getsize(audio_file.name) / (1024 * 1024)
|
22 |
+
if file_size_mb > 3:
|
23 |
+
raise gr.Error(f"File size is {file_size_mb:.2f}MB, which exceeds the 3MB limit. Please use a file that is 3MB or smaller.")
|
24 |
|
25 |
api_key = os.getenv('DEFORUM_API_KEY') # Ensure your environment variable is set
|
26 |
if not api_key:
|