ar08 commited on
Commit
99f8018
Β·
verified Β·
1 Parent(s): 8d734b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -6
app.py CHANGED
@@ -104,12 +104,23 @@ def transcribe_and_chat(audio):
104
  return response, audio_path
105
 
106
  def create_demo():
107
- with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
108
  gr.Markdown(
109
  """
110
- # πŸ—£οΈ AI Voice Assistant
111
- Welcome to your personal voice assistant! Simply record your voice, and I will respond with both text and speech. The assistant will automatically start listening after playing its response. Powered by advanced AI models.
112
- """
 
 
113
  )
114
 
115
  with gr.Row():
@@ -123,7 +134,7 @@ def create_demo():
123
  audio_output = gr.Audio(label="πŸ”Š AI Voice Response", autoplay=True, elem_id="audio-output")
124
 
125
  # Add some spacing and a divider
126
- gr.Markdown("---")
127
 
128
  # Processing the audio input
129
  def process_audio(audio, volume):
@@ -200,4 +211,4 @@ def create_demo():
200
  # Launch the Gradio app
201
  if __name__ == "__main__":
202
  demo = create_demo()
203
- demo.launch(server_name="0.0.0.0", server_port=7860)
 
104
  return response, audio_path
105
 
106
  def create_demo():
107
+ with gr.Blocks(css="""
108
+ #audio-input {border: 2px solid #ffb703; padding: 10px;}
109
+ #chat-output {background-color: #023047; color: #ffffff;}
110
+ #audio-output {border: 2px solid #8ecae6;}
111
+ #clear-button {background-color: #fb8500; color: white;}
112
+ #voice-volume {background-color: #219ebc;}
113
+ button {font-size: 16px;}
114
+ audio {background-color: #ffb703; border-radius: 10px;}
115
+ footer {display: none;}
116
+ """) as demo:
117
  gr.Markdown(
118
  """
119
+ <div style='text-align:center; color:#023047; font-size: 28px; font-weight: bold;'>πŸ—£οΈ AI Voice Assistant</div>
120
+ <p style='text-align:center; color:#8ecae6; font-size: 18px;'>Talk to your personal AI! Record your voice, and get a response in both text and audio.</p>
121
+ <p style='text-align:center; color:#8ecae6;'>Powered by advanced AI models for real-time interaction.</p>
122
+ """,
123
+ elem_id="header"
124
  )
125
 
126
  with gr.Row():
 
134
  audio_output = gr.Audio(label="πŸ”Š AI Voice Response", autoplay=True, elem_id="audio-output")
135
 
136
  # Add some spacing and a divider
137
+ gr.Markdown("<hr style='border: 1px solid #8ecae6;'/>")
138
 
139
  # Processing the audio input
140
  def process_audio(audio, volume):
 
211
  # Launch the Gradio app
212
  if __name__ == "__main__":
213
  demo = create_demo()
214
+ demo.launch(server_name="0.0.0.0", server_port=7860)