Michael Yang
commited on
Commit
•
28909fe
1
Parent(s):
692c28c
split -> strip
Browse files
app.py
CHANGED
@@ -148,7 +148,7 @@ def parse_input(text=None):
|
|
148 |
text_split = text.split(bg_prompt_text)
|
149 |
if len(text_split) == 2:
|
150 |
gen_boxes, bg_prompt = text_split
|
151 |
-
gen_boxes = ast.literal_eval(gen_boxes.
|
152 |
bg_prompt = bg_prompt.strip()
|
153 |
except Exception as e:
|
154 |
raise gr.Error(f"response format invalid: {e} (text: {text})")
|
|
|
148 |
text_split = text.split(bg_prompt_text)
|
149 |
if len(text_split) == 2:
|
150 |
gen_boxes, bg_prompt = text_split
|
151 |
+
gen_boxes = ast.literal_eval(gen_boxes.strip())
|
152 |
bg_prompt = bg_prompt.strip()
|
153 |
except Exception as e:
|
154 |
raise gr.Error(f"response format invalid: {e} (text: {text})")
|