lysandre HF staff commited on
Commit
7e9cddf
1 Parent(s): 58a697f
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -22,12 +22,14 @@ def submit(source_repo, token):
22
  create_repo(target_repo, token=hfa, private=True)
23
 
24
  with tempfile.TemporaryDirectory() as tmp:
25
- snapshot_download(source_repo, local_dir=tmp, local_dir_use_symlinks=False)
26
  upload_folder(repo_id=target_repo, folder_path=tmp, token=hfa)
27
 
28
  return "success"
29
 
30
- description = "<h3>Submit your Hugging Face assignment.</h3> \nEnter the source repository (that should be private and only " \
 
 
31
  "accessible to you!) and your read token. \n\nWe'll duplicate it privately so that we may take a look. " \
32
  "We do not save your read token."
33
 
@@ -51,4 +53,4 @@ with gr.Blocks(title="Submit your assignment!") as demo:
51
 
52
  button.click(submit, inputs=[source, token], outputs=output, concurrency_limit=1)
53
 
54
- demo.queue(max_size=10).launch(show_api=True)
 
22
  create_repo(target_repo, token=hfa, private=True)
23
 
24
  with tempfile.TemporaryDirectory() as tmp:
25
+ snapshot_download(source_repo, local_dir=tmp, local_dir_use_symlinks=False, token=token)
26
  upload_folder(repo_id=target_repo, folder_path=tmp, token=hfa)
27
 
28
  return "success"
29
 
30
+
31
+ description = "<h3>Submit your Hugging Face assignment.</h3> \nEnter the source repository (that should be private " \
32
+ "and only " \
33
  "accessible to you!) and your read token. \n\nWe'll duplicate it privately so that we may take a look. " \
34
  "We do not save your read token."
35
 
 
53
 
54
  button.click(submit, inputs=[source, token], outputs=output, concurrency_limit=1)
55
 
56
+ demo.queue(max_size=10).launch(show_api=True)