Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -443,7 +443,7 @@ def load_examples_data():
|
|
| 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)
|
|
@@ -766,6 +766,18 @@ def create_interface():
|
|
| 766 |
Upload an image, describe your vision, and get professional Lightroom presets!
|
| 767 |
""")
|
| 768 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 769 |
with gr.Row():
|
| 770 |
with gr.Column(scale=1):
|
| 771 |
# Input image upload component
|
|
@@ -824,11 +836,11 @@ def create_interface():
|
|
| 824 |
# Quick examples
|
| 825 |
gr.Markdown("### 💡 Example Prompts:")
|
| 826 |
examples = [
|
| 827 |
-
"
|
| 828 |
-
"I
|
| 829 |
-
"
|
| 830 |
-
"
|
| 831 |
-
"Make
|
| 832 |
]
|
| 833 |
|
| 834 |
example_buttons = []
|
|
@@ -865,7 +877,7 @@ def create_interface():
|
|
| 865 |
}
|
| 866 |
.card-header {
|
| 867 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 868 |
-
color: white;
|
| 869 |
padding: 12px 20px;
|
| 870 |
border-radius: 12px;
|
| 871 |
margin-bottom: 20px;
|
|
@@ -936,13 +948,13 @@ def create_interface():
|
|
| 936 |
gr.Markdown("#### ⚙️ Retouching Settings")
|
| 937 |
if example['config_lua']:
|
| 938 |
with gr.Column(elem_classes="config-container"):
|
| 939 |
-
config_preview = example['config_lua'][:
|
| 940 |
gr.Code(
|
| 941 |
config_preview,
|
| 942 |
label="Configuration Preview",
|
| 943 |
language="javascript", # Use javascript for better syntax highlighting
|
| 944 |
-
lines=
|
| 945 |
-
max_lines=
|
| 946 |
interactive=False
|
| 947 |
)
|
| 948 |
|
|
|
|
| 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)
|
|
|
|
| 766 |
Upload an image, describe your vision, and get professional Lightroom presets!
|
| 767 |
""")
|
| 768 |
|
| 769 |
+
# Important notices - collapsible
|
| 770 |
+
with gr.Accordion("⚠️ Important Notice", open=False):
|
| 771 |
+
gr.HTML("""
|
| 772 |
+
<div style="background: linear-gradient(135deg, #fff3cd, #ffeaa7); border: 1px solid #ffc107; border-radius: 8px; padding: 16px; margin: 8px 0;">
|
| 773 |
+
<h4 style="color: #856404; margin-top: 0;">📋 Important Information:</h4>
|
| 774 |
+
<ul style="color: #856404; margin-bottom: 0;">
|
| 775 |
+
<li><strong>Preview Version:</strong> This is currently a preview version. We will be releasing an updated version with enhanced features and support for localized editing capabilities in the future.</li>
|
| 776 |
+
<li><strong>Image Copyright:</strong> Some example images are collected from the internet and related communities. If there are any copyright concerns, please contact us for removal.</li>
|
| 777 |
+
</ul>
|
| 778 |
+
</div>
|
| 779 |
+
""")
|
| 780 |
+
|
| 781 |
with gr.Row():
|
| 782 |
with gr.Column(scale=1):
|
| 783 |
# Input image upload component
|
|
|
|
| 836 |
# Quick examples
|
| 837 |
gr.Markdown("### 💡 Example Prompts:")
|
| 838 |
examples = [
|
| 839 |
+
"Warm, vintage style with soft tones and dreamy haze for a nostalgic feel.",
|
| 840 |
+
"I desire a Melancholy Blues style to evoke a deeper, more reflective mood in the scene.",
|
| 841 |
+
"I aim for a striking, high-contrast image with sharp details and a cold, immersive feel. Bold style.",
|
| 842 |
+
"Minimal Ethereal style, clean composition, soft filters for tranquil, airy feel.",
|
| 843 |
+
"Make it edgy with high contrast and a modern, urban feel, please."
|
| 844 |
]
|
| 845 |
|
| 846 |
example_buttons = []
|
|
|
|
| 877 |
}
|
| 878 |
.card-header {
|
| 879 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 880 |
+
color: white !important;
|
| 881 |
padding: 12px 20px;
|
| 882 |
border-radius: 12px;
|
| 883 |
margin-bottom: 20px;
|
|
|
|
| 948 |
gr.Markdown("#### ⚙️ Retouching Settings")
|
| 949 |
if example['config_lua']:
|
| 950 |
with gr.Column(elem_classes="config-container"):
|
| 951 |
+
config_preview = example['config_lua'][:450] + "..." if len(example['config_lua']) > 450 else example['config_lua']
|
| 952 |
gr.Code(
|
| 953 |
config_preview,
|
| 954 |
label="Configuration Preview",
|
| 955 |
language="javascript", # Use javascript for better syntax highlighting
|
| 956 |
+
lines=14,
|
| 957 |
+
max_lines=14,
|
| 958 |
interactive=False
|
| 959 |
)
|
| 960 |
|