Update app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,15 @@
|
|
1 |
import os
|
2 |
-
import sys
|
3 |
import subprocess
|
4 |
|
5 |
# Clone the repository if not already present
|
6 |
if not os.path.exists("edge_vlm"):
|
7 |
subprocess.run(["git", "clone", "https://huggingface.co/irotem98/edge_vlm"])
|
8 |
|
9 |
-
# Change directory to the cloned repository
|
10 |
# Install the required dependencies
|
11 |
subprocess.run(["pip", "install", "-r", "edge_vlm/requirements.txt"])
|
12 |
-
# subprocess.run(["pip", "install", "transformers"])
|
13 |
-
# subprocess.run(["pip", "install", "torch"])
|
14 |
|
15 |
-
#
|
16 |
-
|
17 |
|
18 |
# Now import the model from the cloned repository
|
19 |
from model import MoondreamModel
|
|
|
1 |
import os
|
|
|
2 |
import subprocess
|
3 |
|
4 |
# Clone the repository if not already present
|
5 |
if not os.path.exists("edge_vlm"):
|
6 |
subprocess.run(["git", "clone", "https://huggingface.co/irotem98/edge_vlm"])
|
7 |
|
|
|
8 |
# Install the required dependencies
|
9 |
subprocess.run(["pip", "install", "-r", "edge_vlm/requirements.txt"])
|
|
|
|
|
10 |
|
11 |
+
# Change directory to the cloned repository (so model and file paths work correctly)
|
12 |
+
os.chdir("edge_vlm")
|
13 |
|
14 |
# Now import the model from the cloned repository
|
15 |
from model import MoondreamModel
|