Update app.py
Browse files
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 |
-
|
|
|
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 |
|