Resolve new UMG MCP results
Browse files
app.py
CHANGED
|
@@ -340,7 +340,7 @@ def predict(
|
|
| 340 |
elif isinstance(actual_profile_data, str) and actual_profile_data: # String username
|
| 341 |
profile_username_for_folder = actual_profile_data
|
| 342 |
|
| 343 |
-
folder_name = f"user_uploads/{profile_username_for_folder}/{time.strftime('%Y%m%d%H%M%S')}"
|
| 344 |
|
| 345 |
upload_results = upload_files_to_repo(
|
| 346 |
files=files_to_upload,
|
|
@@ -388,7 +388,7 @@ def predict(
|
|
| 388 |
if not predict_tool:
|
| 389 |
raise gr.Error("MCP tool 'UnlimitedMusicGen_predict_simple' not found on the server.")
|
| 390 |
|
| 391 |
-
profile_username_to_send = "
|
| 392 |
if profile_arg:
|
| 393 |
actual_profile_data = profile_arg
|
| 394 |
# Unwrap if it's a gr.State object
|
|
|
|
| 340 |
elif isinstance(actual_profile_data, str) and actual_profile_data: # String username
|
| 341 |
profile_username_for_folder = actual_profile_data
|
| 342 |
|
| 343 |
+
folder_name = f"user_uploads/{profile_username_for_folder}/{convert_title_to_filename(title_arg)}/{seed_arg}/{time.strftime('%Y%m%d%H%M%S')}"
|
| 344 |
|
| 345 |
upload_results = upload_files_to_repo(
|
| 346 |
files=files_to_upload,
|
|
|
|
| 388 |
if not predict_tool:
|
| 389 |
raise gr.Error("MCP tool 'UnlimitedMusicGen_predict_simple' not found on the server.")
|
| 390 |
|
| 391 |
+
profile_username_to_send = "default_user"
|
| 392 |
if profile_arg:
|
| 393 |
actual_profile_data = profile_arg
|
| 394 |
# Unwrap if it's a gr.State object
|