fffiloni commited on
Commit
0a53748
1 Parent(s): 9334ae9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -24,7 +24,8 @@ def infer(portrait_in, prompt_in):
24
  sdxl_result = get_sdxl(prompt_in)
25
  except ValueError as e:
26
  # Handles the ValueError
27
- error_message = str(e)
 
28
  print(f"An error occurred: {error_message}")
29
  raise gr.Error(f"{error_message}")
30
 
 
24
  sdxl_result = get_sdxl(prompt_in)
25
  except ValueError as e:
26
  # Handles the ValueError
27
+ # Remove unwanted backslashes caused by single quotes
28
+ error_message = str(e).replace('\\', '')
29
  print(f"An error occurred: {error_message}")
30
  raise gr.Error(f"{error_message}")
31