Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
import
|
|
|
2 |
import subprocess
|
3 |
|
4 |
# Clone the repository if not already present
|
@@ -7,13 +8,13 @@ if not os.path.exists("edge_vlm"):
|
|
7 |
|
8 |
# Change directory to the cloned repository
|
9 |
os.chdir("edge_vlm")
|
10 |
-
|
11 |
# Install the required dependencies
|
12 |
subprocess.run(["pip", "install", "-r", "requirements.txt"])
|
13 |
subprocess.run(["pip", "install", "transformers"])
|
14 |
|
15 |
# Now import the model from the cloned repository
|
16 |
-
from
|
17 |
import torch
|
18 |
import gradio as gr
|
19 |
|
|
|
1 |
+
import
|
2 |
+
import sys
|
3 |
import subprocess
|
4 |
|
5 |
# Clone the repository if not already present
|
|
|
8 |
|
9 |
# Change directory to the cloned repository
|
10 |
os.chdir("edge_vlm")
|
11 |
+
sts.path.insert(0,'edge_vlm')
|
12 |
# Install the required dependencies
|
13 |
subprocess.run(["pip", "install", "-r", "requirements.txt"])
|
14 |
subprocess.run(["pip", "install", "transformers"])
|
15 |
|
16 |
# Now import the model from the cloned repository
|
17 |
+
from model import MoondreamModel
|
18 |
import torch
|
19 |
import gradio as gr
|
20 |
|