Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def virtual_tryon(human_img_path, garment_img_path, garment_type, request: Reque
|
|
30 |
if not human_img_path or not garment_img_path:
|
31 |
raise gr.Error("Please upload both a human image and a garment image.")
|
32 |
|
33 |
-
user_ip = request.
|
34 |
if user_ip == "unknown":
|
35 |
# This error is not shown to the user but helps in debugging
|
36 |
print("Warning: Could not determine user IP.")
|
|
|
30 |
if not human_img_path or not garment_img_path:
|
31 |
raise gr.Error("Please upload both a human image and a garment image.")
|
32 |
|
33 |
+
user_ip = request.headers.get('x-forwarded-for') if request else "unknown"
|
34 |
if user_ip == "unknown":
|
35 |
# This error is not shown to the user but helps in debugging
|
36 |
print("Warning: Could not determine user IP.")
|