Spaces:
Running
Running
updated prompt pathnames
Browse files- src/functions.py +4 -1
- src/main.py +3 -1
src/functions.py
CHANGED
|
@@ -59,5 +59,8 @@ def fetch_intstructions(prompt_name: str) -> str:
|
|
| 59 |
Returns:
|
| 60 |
str: Instructions for the given prompt
|
| 61 |
"""
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
| 63 |
return f.read()
|
|
|
|
| 59 |
Returns:
|
| 60 |
str: Instructions for the given prompt
|
| 61 |
"""
|
| 62 |
+
import os
|
| 63 |
+
script_dir = os.path.dirname(__file__)
|
| 64 |
+
prompt_path = os.path.join(script_dir, "prompts", f"{prompt_name}.md")
|
| 65 |
+
with open(prompt_path, "r") as f:
|
| 66 |
return f.read()
|
src/main.py
CHANGED
|
@@ -57,7 +57,9 @@ async def run_streamlit_app():
|
|
| 57 |
|
| 58 |
# Load system instructions
|
| 59 |
try:
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
system_instructions = f.read()
|
| 62 |
|
| 63 |
st.session_state.agent = Agent(
|
|
|
|
| 57 |
|
| 58 |
# Load system instructions
|
| 59 |
try:
|
| 60 |
+
script_dir = os.path.dirname(__file__)
|
| 61 |
+
prompts_path = os.path.join(script_dir, "prompts", "system_instructions.md")
|
| 62 |
+
with open(prompts_path, "r") as f:
|
| 63 |
system_instructions = f.read()
|
| 64 |
|
| 65 |
st.session_state.agent = Agent(
|