Yarflam commited on
Commit
a6f77a7
·
1 Parent(s): 62b9889

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  from ModelLoader import ModelLoader
 
3
  import os
4
 
5
  max_img_wh = 4096 # Set the maximum image size in pixels
@@ -15,11 +16,11 @@ demo = gr.Interface(
15
  fn=inference,
16
  inputs=[
17
  gr.components.Image(type='pil', label='Input Image'),
18
- gr.components.Checkbox(label='Use GPU', value=True) # Precheck the GPU checkbox
19
  ],
20
  outputs=gr.components.Image(type='pil', label='Output Image', format='jpeg'),
21
- title='UnderWater Photo - published by Yarflam',
22
- description='Upload an image to see the model output.',
23
  flagging_mode='never'
24
  )
25
  demo.launch()
 
1
  import gradio as gr
2
  from ModelLoader import ModelLoader
3
+ import torch
4
  import os
5
 
6
  max_img_wh = 4096 # Set the maximum image size in pixels
 
16
  fn=inference,
17
  inputs=[
18
  gr.components.Image(type='pil', label='Input Image'),
19
+ gr.components.Checkbox(label='Use GPU', value=torch.cuda.is_available()) # Precheck the GPU checkbox
20
  ],
21
  outputs=gr.components.Image(type='pil', label='Output Image', format='jpeg'),
22
+ title="Underwater Photo Enhancement",
23
+ description="This tool enhances the quality of underwater photos by improving clarity and color. Upload your underwater photo to see the enhanced version.",
24
  flagging_mode='never'
25
  )
26
  demo.launch()