nightfury commited on
Commit
f00ee3e
1 Parent(s): bf66421

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -15,6 +15,17 @@ from inpainting import StableDiffusionInpaintingPipeline
15
  from torchvision import transforms
16
  from clipseg.models.clipseg import CLIPDensePredT
17
 
 
 
 
 
 
 
 
 
 
 
 
18
  auth_token = os.environ.get("API_TOKEN") or True
19
 
20
  def download_image(url):
 
15
  from torchvision import transforms
16
  from clipseg.models.clipseg import CLIPDensePredT
17
 
18
+ #from huggingface_hub import hf_hub_download
19
+ #hf_hub_download(repo_id="ThereforeGames/txt2mask", filename="/repositories/clipseg/")
20
+ #clone_from (str, optional) — Either a repository url or repo_id. Example:
21
+ #api = HfApi()
22
+
23
+ from huggingface_hub import Repository
24
+ with Repository(local_dir="clipseg", clone_from="ThereforeGames/txt2mask/repositories/clipseg/").commit(commit_message="clipseg uploaded...")
25
+ # with open("file.txt", "w+") as f:
26
+ # f.write(json.dumps({"hey": 8}))
27
+
28
+
29
  auth_token = os.environ.get("API_TOKEN") or True
30
 
31
  def download_image(url):