Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -87,8 +87,8 @@ def filter_text(text):
|
|
87 |
pattern = f"(.*?){re.escape(phrase)}(.*)"
|
88 |
match = re.search(pattern, text)
|
89 |
# match = re.search(pattern, text,flags=re.DOTALL)
|
90 |
-
|
91 |
-
return
|
92 |
|
93 |
MAX_SEED = np.iinfo(np.int32).max
|
94 |
MAX_IMAGE_SIZE = 4096
|
@@ -111,7 +111,7 @@ def infer(
|
|
111 |
"You are an AI assistant that rewrites image prompts to be more descriptive and detailed."
|
112 |
)
|
113 |
user_prompt_rewrite = (
|
114 |
-
"Rewrite this prompt to be more descriptive and detailed: "
|
115 |
)
|
116 |
input_text = f"{system_prompt_rewrite} {user_prompt_rewrite} {prompt}"
|
117 |
print("-- got prompt --")
|
|
|
87 |
pattern = f"(.*?){re.escape(phrase)}(.*)"
|
88 |
match = re.search(pattern, text)
|
89 |
# match = re.search(pattern, text,flags=re.DOTALL)
|
90 |
+
# filtered_text = match.group(2)
|
91 |
+
return text
|
92 |
|
93 |
MAX_SEED = np.iinfo(np.int32).max
|
94 |
MAX_IMAGE_SIZE = 4096
|
|
|
111 |
"You are an AI assistant that rewrites image prompts to be more descriptive and detailed."
|
112 |
)
|
113 |
user_prompt_rewrite = (
|
114 |
+
"Rewrite this prompt to be more descriptive and detailed and only return the rewritten text: "
|
115 |
)
|
116 |
input_text = f"{system_prompt_rewrite} {user_prompt_rewrite} {prompt}"
|
117 |
print("-- got prompt --")
|