nightfury commited on
Commit
33b2b35
1 Parent(s): eaf1bb9

Update app_t.py

Browse files
Files changed (1) hide show
  1. app_t.py +13 -2
app_t.py CHANGED
@@ -8,7 +8,18 @@ download_and_extract_zip_file()
8
  clone_github_repository()
9
 
10
  with gr.Blocks() as demo:
11
- ...application code goes here ...
12
-
13
 
14
  demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  clone_github_repository()
9
 
10
  with gr.Blocks() as demo:
 
 
11
 
12
  demo.launch()
13
+
14
+ import time
15
+ import git
16
+ from git import RemoteProgress
17
+
18
+ class CloneProgress(RemoteProgress):
19
+ def update(self, op_code, cur_count, max_count=None, message=''):
20
+ if message:
21
+ print(message)
22
+
23
+ print('Cloning into %s' % git_root)
24
+ git.Repo.clone_from('https://github.com/your-repo', '/your/repo/dir',
25
+ branch='master', progress=CloneProgress())