Update app.py
Browse files
app.py
CHANGED
|
@@ -24,9 +24,8 @@ os.makedirs(Ref_path)
|
|
| 24 |
os.makedirs(Ref_path_T)
|
| 25 |
os.makedirs('result')
|
| 26 |
|
| 27 |
-
os.system("wget https://www.dropbox.com/s/xv6inxwy0so4ni0/LR.png -O
|
| 28 |
-
os.system("wget https://www.dropbox.com/s/abydd1oczs1163l/Ref.png -O
|
| 29 |
-
os.system("wget https://www.dropbox.com/s/abydd1oczs1163l/Ref.png -O {}/0000.png".format(Ref_path_T))
|
| 30 |
|
| 31 |
def resize(img):
|
| 32 |
max_side = 1024
|
|
@@ -43,9 +42,9 @@ def inference(LR, Ref):
|
|
| 43 |
#LR = resize(LR)
|
| 44 |
#Ref = resize(Ref)
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
|
| 50 |
os.system("python -B run.py \
|
| 51 |
--mode amp_RefVSR_small_MFID_8K \
|
|
@@ -73,6 +72,6 @@ article = "<p style='text-align: center'><b>To check the full capability of the
|
|
| 73 |
#Image.open('LR.png').save(os.path.join(LR_path, '0000.png'))
|
| 74 |
#Image.open('LR.png')
|
| 75 |
|
| 76 |
-
examples=[[
|
| 77 |
|
| 78 |
gr.Interface(inference,[gr.inputs.Image(type="pil"), gr.inputs.Image(type="pil")],gr.outputs.Image(type="file"),title=title,description=description,article=article,theme ="peach",examples=examples).launch(enable_queue=True)
|
|
|
|
| 24 |
os.makedirs(Ref_path_T)
|
| 25 |
os.makedirs('result')
|
| 26 |
|
| 27 |
+
os.system("wget https://www.dropbox.com/s/xv6inxwy0so4ni0/LR.png -O LR.png")
|
| 28 |
+
os.system("wget https://www.dropbox.com/s/abydd1oczs1163l/Ref.png -O Ref.png")
|
|
|
|
| 29 |
|
| 30 |
def resize(img):
|
| 31 |
max_side = 1024
|
|
|
|
| 42 |
#LR = resize(LR)
|
| 43 |
#Ref = resize(Ref)
|
| 44 |
|
| 45 |
+
LR.save(os.path.join(LR_path, '0000.png'))
|
| 46 |
+
Ref.save(os.path.join(Ref_path, '0000.png'))
|
| 47 |
+
Ref.save(os.path.join(Ref_path_T, '0000.png'))
|
| 48 |
|
| 49 |
os.system("python -B run.py \
|
| 50 |
--mode amp_RefVSR_small_MFID_8K \
|
|
|
|
| 72 |
#Image.open('LR.png').save(os.path.join(LR_path, '0000.png'))
|
| 73 |
#Image.open('LR.png')
|
| 74 |
|
| 75 |
+
examples=[['LR.png'], ['Ref.png']]
|
| 76 |
|
| 77 |
gr.Interface(inference,[gr.inputs.Image(type="pil"), gr.inputs.Image(type="pil")],gr.outputs.Image(type="file"),title=title,description=description,article=article,theme ="peach",examples=examples).launch(enable_queue=True)
|