oauth
Browse files
README.md
CHANGED
|
@@ -9,8 +9,6 @@ app_file: app.py
|
|
| 9 |
pinned: false
|
| 10 |
license: other
|
| 11 |
short_description: Transform flat-lay shots into on-model photos
|
| 12 |
-
|
| 13 |
-
hf_oauth: true
|
| 14 |
---
|
| 15 |
|
| 16 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 9 |
pinned: false
|
| 10 |
license: other
|
| 11 |
short_description: Transform flat-lay shots into on-model photos
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
CHANGED
|
@@ -209,12 +209,9 @@ def load_description(file_path):
|
|
| 209 |
return content
|
| 210 |
|
| 211 |
|
| 212 |
-
def generate_image(main_image, background_image, did, request: gr.Request
|
| 213 |
if not did:
|
| 214 |
did = str(uuid.uuid4())
|
| 215 |
-
if not oauth_token:
|
| 216 |
-
m = "Please log in to your Hugging Face account to use the features of this application."
|
| 217 |
-
return gr.Warning(m), did
|
| 218 |
if main_image is None or background_image is None:
|
| 219 |
m = "Please upload both the main image and the background reference image before generating."
|
| 220 |
return gr.Warning(m), did
|
|
|
|
| 209 |
return content
|
| 210 |
|
| 211 |
|
| 212 |
+
def generate_image(main_image, background_image, did, request: gr.Request):
|
| 213 |
if not did:
|
| 214 |
did = str(uuid.uuid4())
|
|
|
|
|
|
|
|
|
|
| 215 |
if main_image is None or background_image is None:
|
| 216 |
m = "Please upload both the main image and the background reference image before generating."
|
| 217 |
return gr.Warning(m), did
|