pratyyush commited on
Commit
08fa660
·
verified ·
1 Parent(s): a7c0b54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -102,23 +102,26 @@ def deblur_image(filepath):
102
  print(f"Error processing image: {e}")
103
  return None
104
 
105
- # Custom CSS for styling
106
  custom_css = """
107
  /* Hide Gradio's footer and header */
108
  footer, header, .gradio-footer, .gradio-header {
109
  display: none !important;
110
  }
 
111
  /* Non-draggable images */
112
  img {
113
  pointer-events: none !important;
114
  -webkit-user-drag: none !important;
115
  user-select: none !important;
116
  }
 
117
  /* Styling adjustments */
118
  body, .gradio-container {
119
  background-color: #000000 !important;
120
  color: white !important;
121
  }
 
122
  .gr-button {
123
  background: #1e90ff !important;
124
  color: white !important;
@@ -127,25 +130,31 @@ body, .gradio-container {
127
  font-size: 14px !important;
128
  cursor: pointer;
129
  }
 
130
  .gr-button:hover {
131
  background: #0056b3 !important;
132
  }
 
133
  .gr-box, .gr-input, .gr-output {
134
  background-color: #1c1c1c !important;
135
  color: white !important;
136
  border: 1px solid #333333 !important;
137
  }
 
 
 
 
 
138
  """
139
 
140
- # Gradio interface with show_share_button set to False
141
  demo = gr.Interface(
142
  fn=deblur_image,
143
  inputs=gr.File(label="Upload Blurry Image (No Preview)", type="filepath"),
144
  outputs=gr.Image(type="numpy", label="Deblurred Result"),
145
  title="Image Deblurring",
146
  description="Upload a blurry image and get it deblurred using deep learning.",
147
- css=custom_css,
148
- show_share_button=False # Hide the share button
149
  )
150
 
151
  if __name__ == "__main__":
 
102
  print(f"Error processing image: {e}")
103
  return None
104
 
105
+ # Gradio interface using gr.File with correct type
106
  custom_css = """
107
  /* Hide Gradio's footer and header */
108
  footer, header, .gradio-footer, .gradio-header {
109
  display: none !important;
110
  }
111
+
112
  /* Non-draggable images */
113
  img {
114
  pointer-events: none !important;
115
  -webkit-user-drag: none !important;
116
  user-select: none !important;
117
  }
118
+
119
  /* Styling adjustments */
120
  body, .gradio-container {
121
  background-color: #000000 !important;
122
  color: white !important;
123
  }
124
+
125
  .gr-button {
126
  background: #1e90ff !important;
127
  color: white !important;
 
130
  font-size: 14px !important;
131
  cursor: pointer;
132
  }
133
+
134
  .gr-button:hover {
135
  background: #0056b3 !important;
136
  }
137
+
138
  .gr-box, .gr-input, .gr-output {
139
  background-color: #1c1c1c !important;
140
  color: white !important;
141
  border: 1px solid #333333 !important;
142
  }
143
+
144
+ /* Hide the share button icon in the output box */
145
+ .gradio-container .gr-image-output .wrap.svelte-1ipelgc {
146
+ display: none !important;
147
+ }
148
  """
149
 
150
+ # Gradio interface
151
  demo = gr.Interface(
152
  fn=deblur_image,
153
  inputs=gr.File(label="Upload Blurry Image (No Preview)", type="filepath"),
154
  outputs=gr.Image(type="numpy", label="Deblurred Result"),
155
  title="Image Deblurring",
156
  description="Upload a blurry image and get it deblurred using deep learning.",
157
+ css=custom_css
 
158
  )
159
 
160
  if __name__ == "__main__":