Oysiyl commited on
Commit
ee35bee
·
1 Parent(s): 4b1e9b9

more lines to show error message and update error message

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -210,8 +210,8 @@ def generate_qr_code(prompt: str, text_input: str, input_type: str = "URL", imag
210
  )
211
  except RuntimeError as e:
212
  error_msg = (
213
- f"Error generating QR code: {str(e)} "
214
- "Try with a shorter text, increase the image size, or decrease the border size, module size, and error correction level."
215
  )
216
  return None, error_msg
217
 
@@ -447,6 +447,7 @@ if __name__ == "__main__":
447
  error_message = gr.Textbox(
448
  label="Status / Errors",
449
  interactive=False,
 
450
  )
451
 
452
  # When clicking the button, it will trigger the main function
 
210
  )
211
  except RuntimeError as e:
212
  error_msg = (
213
+ f"Error generating QR code: {str(e)}\n"
214
+ "Try with a shorter text, increase the image size, or decrease the border size, module size, and error correction level under Advanced Settings."
215
  )
216
  return None, error_msg
217
 
 
447
  error_message = gr.Textbox(
448
  label="Status / Errors",
449
  interactive=False,
450
+ lines=3,
451
  )
452
 
453
  # When clicking the button, it will trigger the main function