Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
449b4e2
1
Parent(s):
1308c21
adding install in app
Browse files
app.py
CHANGED
@@ -1,3 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
import uuid
|
3 |
import tempfile
|
|
|
1 |
+
import subprocess
|
2 |
+
import sys
|
3 |
+
|
4 |
+
# Ensure the package is installed from the Git repository
|
5 |
+
package_name = "vqasynth" # Replace with the actual package name if different
|
6 |
+
git_repo_url = "git+https://github.com/remyxai/VQASynth.git"
|
7 |
+
|
8 |
+
try:
|
9 |
+
__import__(package_name)
|
10 |
+
except ImportError:
|
11 |
+
print(f"{package_name} not found. Installing from {git_repo_url}...")
|
12 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", git_repo_url])
|
13 |
+
|
14 |
import os
|
15 |
import uuid
|
16 |
import tempfile
|