irotem98 commited on
Commit
f984fc9
Β·
verified Β·
1 Parent(s): ec1a268

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
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
- # os.chdir("edge_vlm")
16
- sys.path.insert(0,'./edge_vlm')
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