Skip to content

Commit b86d4b7

Browse files
committed
minifix: prompt (and prompt_file) can be edited via web UI
1 parent ced4e06 commit b86d4b7

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

gui.py

+16
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,22 @@ def convert_tuple_to_list(data, keys):
196196
st.subheader("Prompt File")
197197
st.session_state.config_data['prompt_file'] = st.text_input("Prompt File Path", st.session_state.config_data.get('prompt_file', 'prompt_IT.txt'))
198198

199+
# Load and display prompt file content
200+
prompt_file_path = st.session_state.config_data['prompt_file']
201+
if Path(prompt_file_path).exists():
202+
with open(prompt_file_path, 'r') as f:
203+
prompt_content = f.read()
204+
else:
205+
prompt_content = ""
206+
207+
st.subheader("Edit Prompt File")
208+
new_prompt_content = st.text_area("Prompt File Content", prompt_content, height=200)
209+
210+
if st.button("Save Prompt"):
211+
with open(prompt_file_path, 'w') as f:
212+
f.write(new_prompt_content)
213+
st.success("Prompt file saved successfully!")
214+
199215
st.divider()
200216

201217
st.subheader("RSS Retention Options")

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name='uglypy', # The package name on PyPI
9-
version='0.0.28', # Initial version, update manually for major changes
9+
version='0.0.29', # Initial version, update manually for major changes
1010
author='Fabrizio Salmi',
1111
author_email='[email protected]', # Replace with your email
1212
description='A Python package for aggregating and processing RSS feeds with LLM-enhanced content rewriting.',

0 commit comments

Comments
 (0)