Ahmadkhan12 commited on
Commit
d045262
Β·
verified Β·
1 Parent(s): a065125

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -71,14 +71,14 @@ def process_video(uploaded_video):
71
 
72
  output_video = add_music_to_video(video_path, chunks_folder="./chunks")
73
  if "Error" in output_video:
74
- return None, "\n".join(debug_logs)
75
 
76
- return output_video, "\n".join(debug_logs)
77
  except Exception as e:
78
  error_message = f"Error in process_video: {str(e)}"
79
  log_message(error_message)
80
  traceback.print_exc()
81
- return None, "\n".join(debug_logs)
82
 
83
  # Gradio Interface with more nature and music-themed emojis
84
  interface = gr.Interface(
@@ -86,7 +86,6 @@ interface = gr.Interface(
86
  inputs=gr.Video(label="🌿 Upload Your Video 🌱"),
87
  outputs=[
88
  gr.Video(label="🎢 Your Video with Nature's Vibes 🌳🎧"),
89
- gr.Textbox(label="πŸ“ Debug Logs πŸ“‹")
90
  ],
91
  title="Create Nature Vibes 🌿🌞🎢",
92
  description="🌳🌻 Upload a video, and this app will add a 10-second nature-inspired background music track 🎢 that matches the video duration 🌿🌞. Let the natural vibes flow! 🎧"
 
71
 
72
  output_video = add_music_to_video(video_path, chunks_folder="./chunks")
73
  if "Error" in output_video:
74
+ return None
75
 
76
+ return output_video
77
  except Exception as e:
78
  error_message = f"Error in process_video: {str(e)}"
79
  log_message(error_message)
80
  traceback.print_exc()
81
+ return None
82
 
83
  # Gradio Interface with more nature and music-themed emojis
84
  interface = gr.Interface(
 
86
  inputs=gr.Video(label="🌿 Upload Your Video 🌱"),
87
  outputs=[
88
  gr.Video(label="🎢 Your Video with Nature's Vibes 🌳🎧"),
 
89
  ],
90
  title="Create Nature Vibes 🌿🌞🎢",
91
  description="🌳🌻 Upload a video, and this app will add a 10-second nature-inspired background music track 🎢 that matches the video duration 🌿🌞. Let the natural vibes flow! 🎧"