Adityadn commited on
Commit
0b2b515
·
verified ·
1 Parent(s): 8752805

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -23,18 +23,23 @@ def convert_image(image, target_format):
23
  except Exception as e:
24
  return f"Error: {e}"
25
 
26
- # Antarmuka Gradio dengan tema tanpa footer
 
 
 
 
 
27
  interface = gr.Interface(
28
  fn=convert_image,
29
  inputs=[
30
- gr.Image(label="Upload Image", type="filepath", height=256), # Atur tinggi gambar input
31
  gr.Dropdown(label="Select Target Format", choices=supported_formats)
32
  ],
33
  outputs=gr.File(label="Converted Image"),
34
  title="Universal Image Format Converter",
35
  description="Upload an image and select any target format for conversion. Supports all formats recognized by Pillow.",
36
  live=True,
37
- theme=gr.themes.Base() # Tema yang menghilangkan footer
38
  )
39
 
40
  # Jalankan aplikasi
 
23
  except Exception as e:
24
  return f"Error: {e}"
25
 
26
+ # CSS untuk menyembunyikan footer
27
+ css = """
28
+ footer {display: none;}
29
+ """
30
+
31
+ # Antarmuka Gradio dengan tema kustom untuk menyembunyikan footer
32
  interface = gr.Interface(
33
  fn=convert_image,
34
  inputs=[
35
+ gr.Image(label="Upload Image", type="filepath", height=100), # Atur tinggi gambar input
36
  gr.Dropdown(label="Select Target Format", choices=supported_formats)
37
  ],
38
  outputs=gr.File(label="Converted Image"),
39
  title="Universal Image Format Converter",
40
  description="Upload an image and select any target format for conversion. Supports all formats recognized by Pillow.",
41
  live=True,
42
+ css=css # Menyertakan CSS kustom untuk menghapus footer
43
  )
44
 
45
  # Jalankan aplikasi