Update app.py
Browse files
app.py
CHANGED
|
@@ -15,6 +15,18 @@ os.system('python -m unidic download')
|
|
| 15 |
# By using XTTS you agree to CPML license https://coqui.ai/cpml
|
| 16 |
os.environ["COQUI_TOS_AGREED"] = "1"
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
# langid is used to detect language for longer text
|
| 19 |
# Most users expect text to be their own language, there is checkbox to disable it
|
| 20 |
import langid
|
|
|
|
| 15 |
# By using XTTS you agree to CPML license https://coqui.ai/cpml
|
| 16 |
os.environ["COQUI_TOS_AGREED"] = "1"
|
| 17 |
|
| 18 |
+
# Fix
|
| 19 |
+
_original_load = torch.load
|
| 20 |
+
|
| 21 |
+
# Π‘ΠΎΠ·Π΄Π°Π΅ΠΌ ΠΎΠ±Π΅ΡΡΠΊΡ, ΠΊΠΎΡΠΎΡΠ°Ρ ΠΏΡΠΈΠ½ΡΠ΄ΠΈΡΠ΅Π»ΡΠ½ΠΎ ΡΡΠ°Π²ΠΈΡ weights_only=False
|
| 22 |
+
def unsafe_load(*args, **kwargs):
|
| 23 |
+
# ΠΡΠ»ΠΈ weights_only Π½Π΅ ΠΏΠ΅ΡΠ΅Π΄Π°Π½ ΡΠ²Π½ΠΎ, ΡΡΠ°Π²ΠΈΠΌ Π΅Π³ΠΎ Π² False
|
| 24 |
+
if 'weights_only' not in kwargs:
|
| 25 |
+
kwargs['weights_only'] = False
|
| 26 |
+
return _original_load(*args, **kwargs)
|
| 27 |
+
torch.load = unsafe_load
|
| 28 |
+
|
| 29 |
+
|
| 30 |
# langid is used to detect language for longer text
|
| 31 |
# Most users expect text to be their own language, there is checkbox to disable it
|
| 32 |
import langid
|