abdullahzunorain commited on
Commit
c9d57cd
·
verified ·
1 Parent(s): b564e77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -8,7 +8,7 @@ from IPython.display import display, HTML
8
 
9
  # Load a smaller Whisper model for faster processing
10
  try:
11
- model = whisper.load_model("tiny")
12
  except Exception as e:
13
  print(f"Error loading Whisper model: {e}")
14
  model = None
@@ -94,7 +94,7 @@ def set_background():
94
  display(HTML(f'''
95
  <style>
96
  body {{
97
- background-image: url("https://raw.githubusercontent.com/abdullahzunorain/voice-to-voice-Chatbot/main/thomas-heintz-0tgMnMIYQ9Y-unsplash.jpg");
98
  background-size: cover;
99
  background-position: center;
100
  background-repeat: no-repeat;
@@ -140,9 +140,9 @@ iface = gr.Interface(
140
  theme="default"
141
  )
142
 
143
- # Launch the Gradio app
144
  if __name__ == "__main__":
145
- iface.launch()
146
 
147
 
148
 
 
8
 
9
  # Load a smaller Whisper model for faster processing
10
  try:
11
+ model = whisper.load_model("tiny", weights_only=True) # Set weights_only=True to address the warning
12
  except Exception as e:
13
  print(f"Error loading Whisper model: {e}")
14
  model = None
 
94
  display(HTML(f'''
95
  <style>
96
  body {{
97
+ background-image: url("https://github.com/abdullahzunorain/voice-to-voice-Chatbot/blob/main/image_1");
98
  background-size: cover;
99
  background-position: center;
100
  background-repeat: no-repeat;
 
140
  theme="default"
141
  )
142
 
143
+ # Launch the Gradio app with public sharing enabled
144
  if __name__ == "__main__":
145
+ iface.launch(share=True)
146
 
147
 
148