Ashhar
commited on
Commit
·
1675db5
1
Parent(s):
5bec612
fixed regex for image prompt matching
Browse files
app.py
CHANGED
@@ -107,7 +107,7 @@ def __matchingKeywordsCount(keywords: List[str], text: str):
|
|
107 |
|
108 |
|
109 |
def __getRawImagePromptDetails(prompt: str, response: str) -> Tuple[str, str, str]:
|
110 |
-
regex = r'[^a-z0-9 \n
|
111 |
|
112 |
cleanedResponse = re.sub(regex, '', response.lower())
|
113 |
U.pprint(f"{cleanedResponse=}")
|
|
|
107 |
|
108 |
|
109 |
def __getRawImagePromptDetails(prompt: str, response: str) -> Tuple[str, str, str]:
|
110 |
+
regex = r'[^a-z0-9 \n\.\-\:\/]|((the) +)'
|
111 |
|
112 |
cleanedResponse = re.sub(regex, '', response.lower())
|
113 |
U.pprint(f"{cleanedResponse=}")
|