Update app.py
Browse files
app.py
CHANGED
|
@@ -31,10 +31,13 @@ original_launch = gr.Blocks.launch
|
|
| 31 |
|
| 32 |
# Créer une nouvelle méthode qui force l'auth
|
| 33 |
def forced_auth_launch(self, *args, **kwargs):
|
|
|
|
| 34 |
kwargs['auth'] = (USERNAME, PASSWORD)
|
| 35 |
kwargs['auth_message'] = "Authentification VibeVoice requise"
|
| 36 |
kwargs['server_name'] = "0.0.0.0"
|
|
|
|
| 37 |
kwargs.pop('share', None)
|
|
|
|
| 38 |
print("🔒 AUTHENTIFICATION FORCÉE APPLIQUÉE")
|
| 39 |
return original_launch(self, *args, **kwargs)
|
| 40 |
|
|
@@ -45,14 +48,14 @@ gr.Interface.launch = forced_auth_launch
|
|
| 45 |
import torch
|
| 46 |
print(f"GPU: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'CPU'}")
|
| 47 |
|
| 48 |
-
#
|
| 49 |
os.chdir("VV_Clone_1")
|
| 50 |
sys.path.insert(0, os.getcwd())
|
| 51 |
|
| 52 |
-
# Configurer les arguments
|
| 53 |
sys.argv = ["gradio_demo.py", "--model_path", "aoi-ot/VibeVoice-7B"]
|
| 54 |
|
| 55 |
-
#
|
| 56 |
from demo.gradio_demo import main
|
| 57 |
print("🚀 Lancement de VibeVoice avec authentification forcée...")
|
| 58 |
main()
|
|
|
|
| 31 |
|
| 32 |
# Créer une nouvelle méthode qui force l'auth
|
| 33 |
def forced_auth_launch(self, *args, **kwargs):
|
| 34 |
+
# Forcer l'authentification
|
| 35 |
kwargs['auth'] = (USERNAME, PASSWORD)
|
| 36 |
kwargs['auth_message'] = "Authentification VibeVoice requise"
|
| 37 |
kwargs['server_name'] = "0.0.0.0"
|
| 38 |
+
# IMPORTANT: Supprimer share qui cause des problèmes
|
| 39 |
kwargs.pop('share', None)
|
| 40 |
+
kwargs['share'] = False # Forcer à False
|
| 41 |
print("🔒 AUTHENTIFICATION FORCÉE APPLIQUÉE")
|
| 42 |
return original_launch(self, *args, **kwargs)
|
| 43 |
|
|
|
|
| 48 |
import torch
|
| 49 |
print(f"GPU: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'CPU'}")
|
| 50 |
|
| 51 |
+
# Changer de dossier AVANT l'import
|
| 52 |
os.chdir("VV_Clone_1")
|
| 53 |
sys.path.insert(0, os.getcwd())
|
| 54 |
|
| 55 |
+
# Configurer les arguments SANS --share
|
| 56 |
sys.argv = ["gradio_demo.py", "--model_path", "aoi-ot/VibeVoice-7B"]
|
| 57 |
|
| 58 |
+
# Importer et lancer
|
| 59 |
from demo.gradio_demo import main
|
| 60 |
print("🚀 Lancement de VibeVoice avec authentification forcée...")
|
| 61 |
main()
|