noumanjavaid commited on
Commit
9560e28
·
verified ·
1 Parent(s): 04edbaf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -232,7 +232,8 @@ def process_smile_enhancement(input_image, max_attempts=2):
232
  if image_path:
233
  # Load and convert the image if needed
234
  try:
235
- result_img = Image.open(image_path)
 
236
  if result_img.mode == "RGBA":
237
  result_img = result_img.convert("RGB")
238
 
@@ -311,7 +312,4 @@ with gr.Blocks(title="Smile Enhancement", css="footer {visibility: hidden} .grad
311
  )
312
 
313
  # Launch the app without showing Gradio branding or share links
314
- demo.queue(max_size=50).launch(
315
- show_api=False,
316
- show_error=True,
317
- )
 
232
  if image_path:
233
  # Load and convert the image if needed
234
  try:
235
+ result_img = Image.
236
+ open(image_path)
237
  if result_img.mode == "RGBA":
238
  result_img = result_img.convert("RGB")
239
 
 
312
  )
313
 
314
  # Launch the app without showing Gradio branding or share links
315
+ demo.launch(show_api=False, show_error=True)