Spaces:
Runtime error
Runtime error
Update app.py
Browse filespossible fix for issue with url for audio track
app.py
CHANGED
|
@@ -66,16 +66,16 @@ def predict_video(input_video, input_audio=None, input_choice="Explosions"):
|
|
| 66 |
#return [input_video, f" Using uploaded audio: {audioFileName}"]
|
| 67 |
else:
|
| 68 |
if (input_choice == "Explosions"):
|
| 69 |
-
input_audio =
|
| 70 |
print("explosion selected")
|
| 71 |
elif (input_choice == "Lightning and Thunder"):
|
| 72 |
-
input_audio =
|
| 73 |
print("lightning and thunder selected")
|
| 74 |
elif (input_choice == "Vehicle Racing"):
|
| 75 |
-
input_audio =
|
| 76 |
print("vehicle racing selected")
|
| 77 |
else:
|
| 78 |
-
input_audio =
|
| 79 |
print("default selected")
|
| 80 |
|
| 81 |
#return [input_video, f" {choice}"]
|
|
|
|
| 66 |
#return [input_video, f" Using uploaded audio: {audioFileName}"]
|
| 67 |
else:
|
| 68 |
if (input_choice == "Explosions"):
|
| 69 |
+
input_audio = os.path.join(os.path.dirname(__file__), "audio/1_seconds_haptic_audio.mp3")
|
| 70 |
print("explosion selected")
|
| 71 |
elif (input_choice == "Lightning and Thunder"):
|
| 72 |
+
input_audio = os.path.join(os.path.dirname(__file__), "audio/8_seconds_Thunder.mp3")
|
| 73 |
print("lightning and thunder selected")
|
| 74 |
elif (input_choice == "Vehicle Racing"):
|
| 75 |
+
input_audio = os.path.join(os.path.dirname(__file__), "audio/5_seconds_vehicle_audio.mp3")
|
| 76 |
print("vehicle racing selected")
|
| 77 |
else:
|
| 78 |
+
input_audio = os.path.join(os.path.dirname(__file__), "audio/5_seconds_haptic_videos.mp3")
|
| 79 |
print("default selected")
|
| 80 |
|
| 81 |
#return [input_video, f" {choice}"]
|