lixiang46 commited on
Commit
5cbc9b1
1 Parent(s): 4311e2a
Files changed (2) hide show
  1. app.py +3 -0
  2. requirements.txt +2 -1
app.py CHANGED
@@ -5,6 +5,7 @@ import gradio as gr
5
  import numpy as np
6
  import random
7
  import base64
 
8
 
9
 
10
  def start_tryon(person_img, garment_img, seed, randomize_seed):
@@ -82,4 +83,6 @@ with gr.Blocks(css=css) as Tryon:
82
 
83
  try_button.click(fn=start_tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used], api_name='tryon')
84
 
 
 
85
  Tryon.queue(max_size=10).launch()
 
5
  import numpy as np
6
  import random
7
  import base64
8
+ import requests
9
 
10
 
11
  def start_tryon(person_img, garment_img, seed, randomize_seed):
 
83
 
84
  try_button.click(fn=start_tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used], api_name='tryon')
85
 
86
+ ip = requests.get('http://ifconfig.me/ip', timeout=1).text.strip()
87
+ print("ip address alibaba", ip)
88
  Tryon.queue(max_size=10).launch()
requirements.txt CHANGED
@@ -4,4 +4,5 @@ invisible_watermark
4
  torch
5
  transformers
6
  xformers
7
- opencv-python
 
 
4
  torch
5
  transformers
6
  xformers
7
+ opencv-python
8
+ requests