Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -78,10 +78,10 @@ class OpenAI:
|
|
78 |
content = result["choices"][0]["message"]["content"].strip()
|
79 |
|
80 |
split_content = content.split("### Prompt for Visual Expression\n\n")
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
|
86 |
#print("split_content:"+split_content)
|
87 |
|
@@ -90,7 +90,7 @@ class OpenAI:
|
|
90 |
#else:
|
91 |
# visualize_prompt = "vacant dish"
|
92 |
|
93 |
-
|
94 |
|
95 |
answers = stability_api.generate(
|
96 |
prompt=visualize_prompt,
|
|
|
78 |
content = result["choices"][0]["message"]["content"].strip()
|
79 |
|
80 |
split_content = content.split("### Prompt for Visual Expression\n\n")
|
81 |
+
if len(split_content) > 1:
|
82 |
+
visualize_prompt = split_content[1]
|
83 |
+
else:
|
84 |
+
visualize_prompt = "vacant dish" # or any default value
|
85 |
|
86 |
#print("split_content:"+split_content)
|
87 |
|
|
|
90 |
#else:
|
91 |
# visualize_prompt = "vacant dish"
|
92 |
|
93 |
+
print("visualize_prompt:"+visualize_prompt)
|
94 |
|
95 |
answers = stability_api.generate(
|
96 |
prompt=visualize_prompt,
|