Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -60,9 +60,9 @@ def enhance_prompt(text, client=client):
|
|
60 |
st.warning(f"Prompt enhancement error: {e}")
|
61 |
return text[:200]
|
62 |
|
63 |
-
save_prompt(
|
64 |
with open(DATA_PATH / "prompts.txt", "a") as f:
|
65 |
-
f.write(f"{image_name}: {
|
66 |
|
67 |
def generate_variations(prompt, num_variants=8, use_enhanced=True):
|
68 |
instructions = [
|
|
|
60 |
st.warning(f"Prompt enhancement error: {e}")
|
61 |
return text[:200]
|
62 |
|
63 |
+
def save_prompt(image_name, enhanced_prompt):
|
64 |
with open(DATA_PATH / "prompts.txt", "a") as f:
|
65 |
+
f.write(f"{image_name}: {enhanced_prompt}\n")
|
66 |
|
67 |
def generate_variations(prompt, num_variants=8, use_enhanced=True):
|
68 |
instructions = [
|