SD-InPainting / app_t.py
nightfury's picture
Update app_t.py
8e0448f
from zipfile import ZipFile
zf = ZipFile('clipseg-master.zip', 'r')
zf.extractall('clipseg')
zf.close()
import gradio as gr
#download_and_extract_zip_file()
#clone_github_repository()
#with gr.Blocks() as demo:
#demo.launch()
import time
import git
#git.Git("/your/directory/to/clone").clone("git://gitorious.org/git-python/mainline.git")
from git import RemoteProgress
class CloneProgress(RemoteProgress):
def update(self, op_code, cur_count, max_count=None, message=''):
if message:
print(message)
print('Cloning into %s' % git_root)
git.Repo.clone_from('https://github.com/ThereforeGames/txt2mask/repositories/clipseg.git', 'home/user/app/clipseg1',
branch='master', progress=CloneProgress())
#-------------
import sys
import os
path = "home/user/app/clipseg"
clone = "git clone https://github.com/ThereforeGames/txt2mask.git"
os.system("sshpass -p your_password ssh user_name@your_localhost")
os.chdir(path) # Specifying the path where the cloned project needs to be copied
os.system(clone) # Cloning