Spaces:
Build error
Build error
Update run_colab.py
Browse files- run_colab.py +4 -2
run_colab.py
CHANGED
|
@@ -8,12 +8,14 @@ def setup_environment():
|
|
| 8 |
# Install json5 separately
|
| 9 |
subprocess.run([sys.executable, '-m', 'pip', 'install', 'json5'], check=True)
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
from app import create_ui
|
| 12 |
from src.config import ApplicationConfig
|
| 13 |
|
| 14 |
if __name__ == "__main__":
|
| 15 |
-
setup_environment()
|
| 16 |
-
|
| 17 |
# Colab-specific settings
|
| 18 |
app_config = ApplicationConfig.create_default(
|
| 19 |
input_audio_max_duration=-1,
|
|
|
|
| 8 |
# Install json5 separately
|
| 9 |
subprocess.run([sys.executable, '-m', 'pip', 'install', 'json5'], check=True)
|
| 10 |
|
| 11 |
+
# Call setup_environment before any other imports
|
| 12 |
+
setup_environment()
|
| 13 |
+
|
| 14 |
+
# Now import the required modules
|
| 15 |
from app import create_ui
|
| 16 |
from src.config import ApplicationConfig
|
| 17 |
|
| 18 |
if __name__ == "__main__":
|
|
|
|
|
|
|
| 19 |
# Colab-specific settings
|
| 20 |
app_config = ApplicationConfig.create_default(
|
| 21 |
input_audio_max_duration=-1,
|