Spaces:
Configuration error
Configuration error
Gayatri kancharla
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,6 @@ import gradio as gr
|
|
2 |
import asyncio
|
3 |
import os
|
4 |
import logging
|
5 |
-
from voice_processor import VoiceProcessor
|
6 |
-
from interface import create_gradio_interface
|
7 |
-
from user_manager import UserManager
|
8 |
from cryptography.fernet import Fernet
|
9 |
|
10 |
# Setup logging
|
@@ -24,7 +21,16 @@ try:
|
|
24 |
f"gTTS=={gtts.__version__}, cryptography=={cryptography.__version__}, "
|
25 |
f"torch=={torch.__version__}")
|
26 |
except ImportError as e:
|
27 |
-
logger.error(f"Critical dependency missing: {str(e)}. Please run 'pip install -r requirements.txt'.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
raise
|
29 |
|
30 |
# Initialize encryption
|
@@ -37,6 +43,7 @@ user_manager = UserManager(cipher)
|
|
37 |
async def main():
|
38 |
try:
|
39 |
# Create Gradio interface
|
|
|
40 |
iface = create_gradio_interface(user_manager)
|
41 |
|
42 |
# Launch Gradio app
|
|
|
2 |
import asyncio
|
3 |
import os
|
4 |
import logging
|
|
|
|
|
|
|
5 |
from cryptography.fernet import Fernet
|
6 |
|
7 |
# Setup logging
|
|
|
21 |
f"gTTS=={gtts.__version__}, cryptography=={cryptography.__version__}, "
|
22 |
f"torch=={torch.__version__}")
|
23 |
except ImportError as e:
|
24 |
+
logger.error(f"Critical dependency missing: {str(e)}. Please run 'pip install -r requirements.txt' in the Space terminal or check build logs.")
|
25 |
+
raise
|
26 |
+
|
27 |
+
# Import application modules after dependency check
|
28 |
+
try:
|
29 |
+
from voice_processor import VoiceProcessor
|
30 |
+
from interface import create_gradio_interface
|
31 |
+
from user_manager import UserManager
|
32 |
+
except ImportError as e:
|
33 |
+
logger.error(f"Failed to import application modules: {str(e)}. Ensure all files are correctly uploaded.")
|
34 |
raise
|
35 |
|
36 |
# Initialize encryption
|
|
|
43 |
async def main():
|
44 |
try:
|
45 |
# Create Gradio interface
|
46 |
+
logger.info("Creating Gradio interface...")
|
47 |
iface = create_gradio_interface(user_manager)
|
48 |
|
49 |
# Launch Gradio app
|