Ubuntu commited on
Commit
ff24b33
Β·
2 Parent(s): 904e82c 52d5966

changed name

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.png filter=lfs diff=lfs merge=lfs -text
37
+ *.jpg filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Blueberry V0
3
  emoji: πŸš€
4
  colorFrom: purple
5
  colorTo: yellow
 
1
  ---
2
+ title: AYNA 1.0
3
  emoji: πŸš€
4
  colorFrom: purple
5
  colorTo: yellow
app.py CHANGED
@@ -10,7 +10,6 @@ import torch
10
 
11
  # Add the parent directory to the sys.path
12
  sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
13
- from ckpt.pipeline import BlueberryPipeline
14
 
15
  # Download entire repository
16
  def download_repo(repo_id=os.getenv("MODEL_REPO_ID"), local_dir="./ckpt"):
@@ -41,6 +40,8 @@ def download_repo(repo_id=os.getenv("MODEL_REPO_ID"), local_dir="./ckpt"):
41
  # Download model repository
42
  repo_path = download_repo()
43
 
 
 
44
  # Simplified Model Cache class for loading and storing only the pipeline
45
  class ModelCache:
46
  def __init__(self):
@@ -59,7 +60,7 @@ class ModelCache:
59
  # Initialize model cache
60
  model_cache = ModelCache()
61
 
62
- @spaces.GPU
63
  def virtual_tryon(garment_img, person_img, garment_type, sleeve_length, garment_length):
64
  """
65
  Perform virtual try-on with the given garment on the target person
@@ -140,21 +141,47 @@ with gr.Blocks(css=css) as demo:
140
 
141
  with gr.Row():
142
  with gr.Column(scale=2.5):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  # Add radio buttons for different garment types
144
- garment_type = gr.Radio(choices=["upper", "lower", "full-body"], label="Garment Type", value="upper")
145
- sleeve_length = gr.Radio(
146
- choices=["3/4 sleeve", "cap sleeve", "short sleeve", "long sleeve", "sleeveless", "ignore"],
147
- label="Sleeve Length",
148
- visible=True,
149
- interactive=True,
150
- info="Choose 'ignore' if you are not sure"
151
- )
152
- garment_length = gr.Radio(
153
- choices=["crop length", "hip length", "waist length", "tunic length", "thigh length", "knee length", "ignore"],
154
- label="Garment Length",
155
- interactive=True,
156
- info="Choose 'ignore' if you are not sure"
157
- )
 
158
 
159
  # Update sleeve_length visibility based on garment_type
160
  def update_sleeve_visibility(garment):
 
10
 
11
  # Add the parent directory to the sys.path
12
  sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
13
 
14
  # Download entire repository
15
  def download_repo(repo_id=os.getenv("MODEL_REPO_ID"), local_dir="./ckpt"):
 
40
  # Download model repository
41
  repo_path = download_repo()
42
 
43
+ from ckpt.pipeline import BlueberryPipeline
44
+
45
  # Simplified Model Cache class for loading and storing only the pipeline
46
  class ModelCache:
47
  def __init__(self):
 
60
  # Initialize model cache
61
  model_cache = ModelCache()
62
 
63
+ @spaces.GPU(duration=60)
64
  def virtual_tryon(garment_img, person_img, garment_type, sleeve_length, garment_length):
65
  """
66
  Perform virtual try-on with the given garment on the target person
 
141
 
142
  with gr.Row():
143
  with gr.Column(scale=2.5):
144
+ with gr.Column():
145
+ with gr.Row():
146
+ # add example images for garment and humans
147
+ example_garments = [
148
+ "examples/garments/garment-1.png",
149
+ "examples/garments/garment-2.jpg",
150
+ "examples/garments/garment-3.jpg"
151
+ ]
152
+ example_humans = [
153
+ "examples/humans/human-1.jpg",
154
+ "examples/humans/human-2.jpg",
155
+ "examples/humans/human-3.jpg"
156
+ ]
157
+ gr.Examples(
158
+ examples=example_garments,
159
+ inputs=garment_input,
160
+ label="Garment Examples",
161
+ examples_per_page=3
162
+ )
163
+ gr.Examples(
164
+ examples=example_humans,
165
+ inputs=person_input,
166
+ label="Person Examples",
167
+ examples_per_page=3
168
+ )
169
  # Add radio buttons for different garment types
170
+ with gr.Column():
171
+ garment_type = gr.Radio(choices=["upper", "lower", "full-body"], label="Garment Type", value="upper")
172
+ sleeve_length = gr.Radio(
173
+ choices=["3/4 sleeve", "cap sleeve", "short sleeve", "long sleeve", "sleeveless", "ignore"],
174
+ label="Sleeve Length",
175
+ visible=True,
176
+ interactive=True,
177
+ info="Choose 'ignore' if you are not sure"
178
+ )
179
+ garment_length = gr.Radio(
180
+ choices=["crop length", "hip length", "waist length", "tunic length", "thigh length", "knee length", "ignore"],
181
+ label="Garment Length",
182
+ interactive=True,
183
+ info="Choose 'ignore' if you are not sure"
184
+ )
185
 
186
  # Update sleeve_length visibility based on garment_type
187
  def update_sleeve_visibility(garment):
examples/garments/garment-1.png ADDED

Git LFS Details

  • SHA256: 82ef749fa0c255327982596625aa361bcffd47728d9ef33477ba77791376c7ae
  • Pointer size: 131 Bytes
  • Size of remote file: 563 kB
examples/garments/garment-2.jpg ADDED

Git LFS Details

  • SHA256: 8da225f1a63660c9ad896ed65008d0a159ea805aa15d4df77ab43c6bf3882132
  • Pointer size: 131 Bytes
  • Size of remote file: 128 kB
examples/garments/garment-3.jpg ADDED

Git LFS Details

  • SHA256: b2e2c219690ba1e13a090c88f9ed71cd0e49eadea52d0ba1ccd9d2b132700b4d
  • Pointer size: 131 Bytes
  • Size of remote file: 184 kB
examples/humans/human-1.jpg ADDED

Git LFS Details

  • SHA256: 2349bb75f68b512514e6ac27e4ae66c00779b3cbcd4c00bdeb0ecf26ea31ebe3
  • Pointer size: 131 Bytes
  • Size of remote file: 693 kB
examples/humans/human-2.jpg ADDED

Git LFS Details

  • SHA256: e8c0defc24a9fd7c5ecac7ec165fffc654bcc1604f510f2dc5d2109187064545
  • Pointer size: 131 Bytes
  • Size of remote file: 671 kB
examples/humans/human-3.jpg ADDED

Git LFS Details

  • SHA256: db6c040712fdc2cccd0de8063fbcac0227a6237a1a9c5d94a8311bc9e7260798
  • Pointer size: 131 Bytes
  • Size of remote file: 823 kB