AngeT10 commited on
Commit
f1b2801
1 Parent(s): 2291120

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1,14 +1,15 @@
1
 
 
2
  import subprocess
3
  import os
4
  import torch
5
  import urllib.request
6
 
7
- # Verifica se è disponibile una GPU, altrimenti utilizza la CPU
8
- device = "cuda" if torch.cuda.is_available() else "cpu"
9
 
10
  os.environ["COQUI_TOS_AGREED"] = "1"
11
-
12
  import gradio as gr
13
  import torch
14
  import os
@@ -16,10 +17,10 @@ import zipfile
16
  import requests
17
  from TTS.api import TTS
18
 
19
-
20
  os.environ["COQUI_TOS_AGREED"] = "1"
21
 
22
- device = "cuda"
 
23
 
24
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
25
 
@@ -47,7 +48,6 @@ iface = gr.Interface(fn=clone,
47
  title='Voice Clone',
48
  description="""
49
  by [Angetyde](https://youtube.com/@Angetyde?si=7nusP31nTumIkPTF) and [Tony Assi](https://www.tonyassi.com/ )
50
-
51
  use this colab with caution <3.
52
  """,
53
  theme=gr.themes.Base(primary_hue="teal", secondary_hue="teal", neutral_hue="slate"))
 
1
 
2
+
3
  import subprocess
4
  import os
5
  import torch
6
  import urllib.request
7
 
8
+ # Set the device to CPU
9
+ device = "cpu"
10
 
11
  os.environ["COQUI_TOS_AGREED"] = "1"
12
+
13
  import gradio as gr
14
  import torch
15
  import os
 
17
  import requests
18
  from TTS.api import TTS
19
 
 
20
  os.environ["COQUI_TOS_AGREED"] = "1"
21
 
22
+ # Set the device to CPU
23
+ device = "cpu"
24
 
25
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
26
 
 
48
  title='Voice Clone',
49
  description="""
50
  by [Angetyde](https://youtube.com/@Angetyde?si=7nusP31nTumIkPTF) and [Tony Assi](https://www.tonyassi.com/ )
 
51
  use this colab with caution <3.
52
  """,
53
  theme=gr.themes.Base(primary_hue="teal", secondary_hue="teal", neutral_hue="slate"))