File size: 1,358 Bytes
9ad71c5
 
 
 
 
 
 
 
ac8bc5e
 
 
 
 
 
 
 
9ad71c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import os

destination = 'core'

if os.path.exists('.env'):
    from dotenv import load_dotenv
    load_dotenv()

dest = 'melanoma_detection_model_registry'
if not os.path.exists(dest):
    from huggingface_hub import snapshot_download


    snapshot_download(repo_id='RandomCatLover/melanoma_detection_model_registry', local_dir=dest, local_dir_use_symlinks=False)


if not os.path.exists(destination):
    import subprocess
    repo_url = os.getenv("GIT_CORE")
    command = f'git clone {repo_url} {destination}'
    try:
        subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True)#, env=env)
        print('Repository cloned successfully.')
    except subprocess.CalledProcessError as e:
        print(f'Error cloning repository: {e.output.decode()}')


img_qua_path = 'img_qua'
if not os.path.exists(img_qua_path):
    import subprocess
    repo_url = 'https://github.com/idealo/image-quality-assessment.git'
    command = f'git clone {repo_url} {img_qua_path}'
    try:
        subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True)#, env=env)
        print('Repository cloned successfully.')
    except subprocess.CalledProcessError as e:
        print(f'Error cloning repository: {e.output.decode()}')

from core.s import demo

demo.queue(concurrency_count=3)
#demo.launch(auth=("student", "whataday"))
demo.launch()