Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,6 +11,7 @@ SYSTEM_PROMPT_START = read_file("system_prompt_start.txt")
|
|
| 11 |
SYSTEM_PROMPT_SPAM_FILTER = "\n" + read_file("system_prompt_spam_filter.txt")
|
| 12 |
SYSTEM_PROMPT_FEEDBACK = "\n" + read_file("system_prompt_feedback.txt")
|
| 13 |
TARGET_OPTIONS_DIR = "target_options"
|
|
|
|
| 14 |
|
| 15 |
REGION_OPTIONS = [
|
| 16 |
"Alberta",
|
|
@@ -22,7 +23,7 @@ REGION_OPTIONS = [
|
|
| 22 |
]
|
| 23 |
|
| 24 |
def get_region_prompt(region_name):
|
| 25 |
-
file_path = os.path.join(
|
| 26 |
if os.path.exists(file_path):
|
| 27 |
return read_file(file_path)
|
| 28 |
return ""
|
|
|
|
| 11 |
SYSTEM_PROMPT_SPAM_FILTER = "\n" + read_file("system_prompt_spam_filter.txt")
|
| 12 |
SYSTEM_PROMPT_FEEDBACK = "\n" + read_file("system_prompt_feedback.txt")
|
| 13 |
TARGET_OPTIONS_DIR = "target_options"
|
| 14 |
+
REGION_OPTIONS_DIR = "region_options"
|
| 15 |
|
| 16 |
REGION_OPTIONS = [
|
| 17 |
"Alberta",
|
|
|
|
| 23 |
]
|
| 24 |
|
| 25 |
def get_region_prompt(region_name):
|
| 26 |
+
file_path = os.path.join(REGION_OPTIONS_DIR, region_name + ".txt")
|
| 27 |
if os.path.exists(file_path):
|
| 28 |
return read_file(file_path)
|
| 29 |
return ""
|