Spaces:
Running
Running
RandomCatLover
commited on
Commit
•
fc85bd0
1
Parent(s):
c18e718
Init
Browse files- app.py +22 -0
- head.png +0 -0
- requirements.txt +7 -0
app.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
if os.path.exists('.env'):
|
4 |
+
from dotenv import load_dotenv
|
5 |
+
print("Loading environment variables from .env file")
|
6 |
+
load_dotenv()
|
7 |
+
|
8 |
+
destination = 'hidden_gems'
|
9 |
+
|
10 |
+
if not os.path.exists(destination):
|
11 |
+
import subprocess
|
12 |
+
repo_url = os.getenv("GIT_CORE")
|
13 |
+
command = f'git clone {repo_url} {destination}'
|
14 |
+
try:
|
15 |
+
subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True)#, env=env)
|
16 |
+
print('Repository cloned successfully.')
|
17 |
+
except subprocess.CalledProcessError as e:
|
18 |
+
print(f'Error cloning repository')
|
19 |
+
|
20 |
+
from hidden_gems.app import demo
|
21 |
+
|
22 |
+
demo.launch()
|
head.png
ADDED
requirements.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
gradio==4.19.2
|
2 |
+
matplotlib==3.8.3
|
3 |
+
numpy==1.24.1
|
4 |
+
numpy_stl==3.1.1
|
5 |
+
opencv_python==4.9.0.80
|
6 |
+
timm==0.9.16
|
7 |
+
torch==2.2.1+cpu
|