Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,9 +6,20 @@
|
|
6 |
# copies of the Software, and to permit persons to whom the Software is
|
7 |
import spaces
|
8 |
import os
|
|
|
9 |
import subprocess
|
10 |
subprocess.run(['sh', './conda.sh'])
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
import random
|
13 |
import uuid
|
14 |
import gradio as gr
|
|
|
6 |
# copies of the Software, and to permit persons to whom the Software is
|
7 |
import spaces
|
8 |
import os
|
9 |
+
|
10 |
import subprocess
|
11 |
subprocess.run(['sh', './conda.sh'])
|
12 |
+
|
13 |
+
import sys
|
14 |
+
conda_prefix = os.path.expanduser("~/miniconda3")
|
15 |
+
conda_bin = os.path.join(conda_prefix, "bin")
|
16 |
+
|
17 |
+
# Add Conda's bin directory to your PATH
|
18 |
+
os.environ["PATH"] = conda_bin + os.pathsep + os.environ["PATH"]
|
19 |
+
|
20 |
+
# Activate the base environment (adjust if needed)
|
21 |
+
os.system(f"source {conda_bin}/activate base")
|
22 |
+
|
23 |
import random
|
24 |
import uuid
|
25 |
import gradio as gr
|