HussainLatiff commited on
Commit
359511c
Β·
verified Β·
1 Parent(s): c75661d

Update app.py

Browse files

possible fix for issue with url for audio track

Files changed (1) hide show
  1. app.py +4 -4
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 = "https://audiolibrary.blob.core.windows.net/audiolibrary/1_seconds_haptic_audio.mp3"
70
  print("explosion selected")
71
  elif (input_choice == "Lightning and Thunder"):
72
- input_audio = "https://audiolibrary.blob.core.windows.net/audiolibrary/8_seconds_Thunder.mp3"
73
  print("lightning and thunder selected")
74
  elif (input_choice == "Vehicle Racing"):
75
- input_audio = "https://audiolibrary.blob.core.windows.net/audiolibrary/5_seconds_vehicle_audio.mp3"
76
  print("vehicle racing selected")
77
  else:
78
- input_audio = "https://audiolibrary.blob.core.windows.net/audiolibrary/5_seconds_haptic_videos.mp3"
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}"]