Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -441,9 +441,11 @@ def load_examples_data():
|
|
| 441 |
with open(config_path, 'r', encoding='utf-8') as f:
|
| 442 |
config_content = f.read().strip()
|
| 443 |
# Remove "return {" from the beginning and "}" from the end
|
|
|
|
| 444 |
config_content = re.sub(r'^return\s*\{', ' ', config_content)
|
| 445 |
config_content = re.sub(r'\}$', '', config_content.strip())
|
| 446 |
example_data['config_lua'] = config_content
|
|
|
|
| 447 |
example_data['config_path'] = config_path
|
| 448 |
|
| 449 |
examples_data.append(example_data)
|
|
@@ -784,15 +786,15 @@ def create_interface():
|
|
| 784 |
input_image = gr.Image(
|
| 785 |
label="📸 Upload Your Image",
|
| 786 |
type="pil",
|
| 787 |
-
height=
|
| 788 |
)
|
| 789 |
|
| 790 |
# Prompt input
|
| 791 |
user_prompt = gr.Textbox(
|
| 792 |
label="💬 Describe Your Vision",
|
| 793 |
placeholder="Describe your desired retouching style... (e.g., 'I want a dreamy, romantic sunset vibe with soft, warm colors')",
|
| 794 |
-
lines=
|
| 795 |
-
max_lines=
|
| 796 |
)
|
| 797 |
|
| 798 |
# Process button
|
|
@@ -990,7 +992,7 @@ def create_interface():
|
|
| 990 |
)
|
| 991 |
|
| 992 |
# Download section
|
| 993 |
-
preset_file = download_example_preset(example['
|
| 994 |
if preset_file:
|
| 995 |
gr.File(
|
| 996 |
value=preset_file,
|
|
|
|
| 441 |
with open(config_path, 'r', encoding='utf-8') as f:
|
| 442 |
config_content = f.read().strip()
|
| 443 |
# Remove "return {" from the beginning and "}" from the end
|
| 444 |
+
origin_content = config_content
|
| 445 |
config_content = re.sub(r'^return\s*\{', ' ', config_content)
|
| 446 |
config_content = re.sub(r'\}$', '', config_content.strip())
|
| 447 |
example_data['config_lua'] = config_content
|
| 448 |
+
example_data['origin'] = origin_content
|
| 449 |
example_data['config_path'] = config_path
|
| 450 |
|
| 451 |
examples_data.append(example_data)
|
|
|
|
| 786 |
input_image = gr.Image(
|
| 787 |
label="📸 Upload Your Image",
|
| 788 |
type="pil",
|
| 789 |
+
height=350
|
| 790 |
)
|
| 791 |
|
| 792 |
# Prompt input
|
| 793 |
user_prompt = gr.Textbox(
|
| 794 |
label="💬 Describe Your Vision",
|
| 795 |
placeholder="Describe your desired retouching style... (e.g., 'I want a dreamy, romantic sunset vibe with soft, warm colors')",
|
| 796 |
+
lines=6,
|
| 797 |
+
max_lines=8
|
| 798 |
)
|
| 799 |
|
| 800 |
# Process button
|
|
|
|
| 992 |
)
|
| 993 |
|
| 994 |
# Download section
|
| 995 |
+
preset_file = download_example_preset(example['origin'], example['id'])
|
| 996 |
if preset_file:
|
| 997 |
gr.File(
|
| 998 |
value=preset_file,
|