Offex commited on
Commit
5f3a8eb
·
verified ·
1 Parent(s): 8348601

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -11
app.py CHANGED
@@ -24,28 +24,37 @@ def remove_silence(audio_path):
24
  save_audio(output_file, collect_chunks(speech_timestamps, wav), sampling_rate=16000)
25
  return output_file
26
 
27
- # ---- RGB Animation ke liye Custom CSS ----
28
  css = """
29
  @keyframes rgb-glow {
30
- 0% { color: #ff0000; text-shadow: 0 0 8px #ff0000; }
31
- 33% { color: #00ff00; text-shadow: 0 0 8px #00ff00; }
32
- 66% { color: #0000ff; text-shadow: 0 0 8px #0000ff; }
33
- 100% { color: #ff0000; text-shadow: 0 0 8px #ff0000; }
34
  }
35
  .deepu-brand {
36
  text-align: center;
37
- font-size: 26px;
38
  font-weight: bold;
39
- animation: rgb-glow 2s linear infinite;
40
- padding: 20px;
 
41
  letter-spacing: 2px;
 
 
 
 
42
  }
43
  """
44
 
45
  # ---- Gradio Blocks (Advanced UI) ----
46
  with gr.Blocks(css=css, title="AI Silence Remover") as iface:
47
- gr.Markdown("# 🎙️ AI Silence Remover (Silero VAD)")
48
- gr.Markdown("Apni audio upload karein aur AI automatically non-speech parts ko cut kar dega.")
 
 
 
 
49
 
50
  with gr.Row():
51
  audio_in = gr.Audio(type="filepath", label="Raw Audio Upload Karein")
@@ -55,7 +64,7 @@ with gr.Blocks(css=css, title="AI Silence Remover") as iface:
55
  with gr.Row():
56
  audio_out = gr.Audio(type="filepath", label="Processed Audio (Without Silence)")
57
 
58
- # Ye raha aapka RGB animated tag!
59
  gr.HTML('<div class="deepu-brand">✨ Made by Deepu ✨</div>')
60
 
61
  # Button ko function ke sath jodna
 
24
  save_audio(output_file, collect_chunks(speech_timestamps, wav), sampling_rate=16000)
25
  return output_file
26
 
27
+ # ---- RGB Animation aur MS Font ke liye Custom CSS ----
28
  css = """
29
  @keyframes rgb-glow {
30
+ 0% { color: #ff0000; text-shadow: 0 0 10px #ff0000; }
31
+ 33% { color: #00ff00; text-shadow: 0 0 10px #00ff00; }
32
+ 66% { color: #0000ff; text-shadow: 0 0 10px #0000ff; }
33
+ 100% { color: #ff0000; text-shadow: 0 0 10px #ff0000; }
34
  }
35
  .deepu-brand {
36
  text-align: center;
37
+ font-size: 28px;
38
  font-weight: bold;
39
+ font-family: 'Comic Sans MS', 'Trebuchet MS', sans-serif; /* MS Font lagaya gaya hai */
40
+ animation: rgb-glow 2.5s linear infinite;
41
+ padding: 12px;
42
  letter-spacing: 2px;
43
+ margin: 15px 0;
44
+ border: 2px dashed #ddd; /* Thoda stylish border */
45
+ border-radius: 10px;
46
+ background-color: rgba(0, 0, 0, 0.02); /* Halka sa background */
47
  }
48
  """
49
 
50
  # ---- Gradio Blocks (Advanced UI) ----
51
  with gr.Blocks(css=css, title="AI Silence Remover") as iface:
52
+
53
+ # 1. TOP WALA ANIMATED TAG
54
+ gr.HTML('<div class="deepu-brand">✨ Made by Deepu ✨</div>')
55
+
56
+ gr.Markdown("<h1 style='text-align: center;'>🎙️ AI Silence Remover (Silero VAD)</h1>")
57
+ gr.Markdown("<p style='text-align: center;'>Apni audio upload karein aur AI automatically non-speech parts ko cut kar dega.</p>")
58
 
59
  with gr.Row():
60
  audio_in = gr.Audio(type="filepath", label="Raw Audio Upload Karein")
 
64
  with gr.Row():
65
  audio_out = gr.Audio(type="filepath", label="Processed Audio (Without Silence)")
66
 
67
+ # 2. BOTTOM WALA ANIMATED TAG
68
  gr.HTML('<div class="deepu-brand">✨ Made by Deepu ✨</div>')
69
 
70
  # Button ko function ke sath jodna