Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,12 +4,24 @@ import inspect
|
|
4 |
from gradio import routes
|
5 |
from typing import List, Type
|
6 |
|
7 |
-
import requests, os, re, asyncio, queue
|
8 |
import math
|
9 |
import time
|
10 |
import datetime
|
11 |
import requests, json
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
from pprint import pprint
|
14 |
import hivemind
|
15 |
from petals.constants import PUBLIC_INITIAL_PEERS
|
|
|
4 |
from gradio import routes
|
5 |
from typing import List, Type
|
6 |
|
7 |
+
import requests, os, re, asyncio, queue, sys, git
|
8 |
import math
|
9 |
import time
|
10 |
import datetime
|
11 |
import requests, json
|
12 |
|
13 |
+
# git clone petals health
|
14 |
+
def make_safe_dir(dir):
|
15 |
+
if not os.path.exists(dir):
|
16 |
+
os.makedirs(dir)
|
17 |
+
|
18 |
+
def git_clone(git_url):
|
19 |
+
target_dir = os.path.join(GlobalVariable.ProjectRoot, GlobalVariable.Conf.tmp_clone_dir)
|
20 |
+
make_safe_dir(target_dir)
|
21 |
+
git.Git(target_dir).clone(git_url)
|
22 |
+
|
23 |
+
git_clone("https://github.com/petals-infra/health.petals.dev")
|
24 |
+
|
25 |
from pprint import pprint
|
26 |
import hivemind
|
27 |
from petals.constants import PUBLIC_INITIAL_PEERS
|