xp3857 commited on
Commit
62ca83d
·
1 Parent(s): e2d9df3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -146,7 +146,7 @@ def run(image):
146
  run_cmd(command)
147
 
148
  result_restoration = Image.open(f"Temp/final_output/input_img.png")
149
- shutil.rmtree(f"Temp{uid}")
150
 
151
  result_colorization = inferColorization(result_restoration)
152
 
@@ -156,8 +156,12 @@ def load_im(url):
156
 
157
 
158
  with gr.Blocks() as app:
159
- im = gr.Image(label="Input Image")
160
- im_btn=gr.Button(label="Restore")
161
- out_im = gr.Image(label="Restored Image")
 
 
 
 
162
  im_btn.click(run,im,out_im)
163
  app.queue(concurrency_count=100).launch(show_api=False)
 
146
  run_cmd(command)
147
 
148
  result_restoration = Image.open(f"Temp/final_output/input_img.png")
149
+ shutil.rmtree(f"Temp")
150
 
151
  result_colorization = inferColorization(result_restoration)
152
 
 
156
 
157
 
158
  with gr.Blocks() as app:
159
+ with gr.Row():
160
+ gr.Column()
161
+ with gr.Column():
162
+ im = gr.Image(label="Input Image")
163
+ im_btn=gr.Button(label="Restore")
164
+ out_im = gr.Image(label="Restored Image")
165
+ gr.Column()
166
  im_btn.click(run,im,out_im)
167
  app.queue(concurrency_count=100).launch(show_api=False)