Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -64,47 +64,61 @@ def search_artworks(query, is_public_domain=False):
|
|
64 |
# Custom CSS for styling
|
65 |
custom_css = """
|
66 |
.gradio-container {
|
67 |
-
background: linear-gradient(to right, #1a1a1a, #2d2d2d);
|
68 |
-
color: #ffffff;
|
69 |
}
|
70 |
.gr-button {
|
71 |
-
background: linear-gradient(to right, #c94b4b, #4b134f);
|
72 |
-
border: none;
|
73 |
-
color: white;
|
74 |
-
font-weight: bold;
|
75 |
}
|
76 |
.gr-button:hover {
|
77 |
-
background: linear-gradient(to right, #4b134f, #c94b4b);
|
78 |
transform: scale(1.05);
|
79 |
transition: all 0.3s ease;
|
80 |
}
|
81 |
.gr-input {
|
82 |
-
border: 2px solid #4b134f;
|
83 |
-
background: rgba(255, 255, 255, 0.1);
|
84 |
-
color: white;
|
85 |
}
|
86 |
.gr-form {
|
87 |
-
background: rgba(0, 0, 0, 0.2);
|
88 |
-
border-radius: 15px;
|
89 |
-
padding: 20px;
|
90 |
}
|
91 |
.gr-box {
|
92 |
-
border-radius: 15px;
|
93 |
-
border: 2px solid #4b134f;
|
94 |
}
|
95 |
.gr-gallery {
|
96 |
-
background: rgba(0, 0, 0, 0.3);
|
97 |
-
border-radius: 15px;
|
98 |
-
padding: 10px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
"""
|
101 |
|
102 |
# Gradio interface
|
103 |
with gr.Blocks(css=custom_css) as demo:
|
104 |
-
gr.
|
105 |
"""
|
106 |
-
|
107 |
-
|
108 |
"""
|
109 |
)
|
110 |
|
@@ -146,10 +160,4 @@ with gr.Blocks(css=custom_css) as demo:
|
|
146 |
outputs=[gallery, info]
|
147 |
)
|
148 |
|
149 |
-
|
150 |
-
demo.launch(theme=gr.themes.Monochrome(
|
151 |
-
primary_hue="purple",
|
152 |
-
secondary_hue="red",
|
153 |
-
neutral_hue="slate",
|
154 |
-
font=["Helvetica", "ui-sans-serif"]
|
155 |
-
))
|
|
|
64 |
# Custom CSS for styling
|
65 |
custom_css = """
|
66 |
.gradio-container {
|
67 |
+
background: linear-gradient(to right, #1a1a1a, #2d2d2d) !important;
|
68 |
+
color: #ffffff !important;
|
69 |
}
|
70 |
.gr-button {
|
71 |
+
background: linear-gradient(to right, #c94b4b, #4b134f) !important;
|
72 |
+
border: none !important;
|
73 |
+
color: white !important;
|
74 |
+
font-weight: bold !important;
|
75 |
}
|
76 |
.gr-button:hover {
|
77 |
+
background: linear-gradient(to right, #4b134f, #c94b4b) !important;
|
78 |
transform: scale(1.05);
|
79 |
transition: all 0.3s ease;
|
80 |
}
|
81 |
.gr-input {
|
82 |
+
border: 2px solid #4b134f !important;
|
83 |
+
background: rgba(255, 255, 255, 0.1) !important;
|
84 |
+
color: white !important;
|
85 |
}
|
86 |
.gr-form {
|
87 |
+
background: rgba(0, 0, 0, 0.2) !important;
|
88 |
+
border-radius: 15px !important;
|
89 |
+
padding: 20px !important;
|
90 |
}
|
91 |
.gr-box {
|
92 |
+
border-radius: 15px !important;
|
93 |
+
border: 2px solid #4b134f !important;
|
94 |
}
|
95 |
.gr-gallery {
|
96 |
+
background: rgba(0, 0, 0, 0.3) !important;
|
97 |
+
border-radius: 15px !important;
|
98 |
+
padding: 10px !important;
|
99 |
+
}
|
100 |
+
.title-text {
|
101 |
+
text-align: center !important;
|
102 |
+
color: #ffffff !important;
|
103 |
+
font-size: 2.5em !important;
|
104 |
+
margin-bottom: 0.5em !important;
|
105 |
+
text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
|
106 |
+
}
|
107 |
+
.subtitle-text {
|
108 |
+
text-align: center !important;
|
109 |
+
color: #cccccc !important;
|
110 |
+
font-size: 1.2em !important;
|
111 |
+
margin-bottom: 2em !important;
|
112 |
+
font-style: italic !important;
|
113 |
}
|
114 |
"""
|
115 |
|
116 |
# Gradio interface
|
117 |
with gr.Blocks(css=custom_css) as demo:
|
118 |
+
gr.HTML(
|
119 |
"""
|
120 |
+
<div class="title-text">🎨 Art Institute of Chicago Explorer</div>
|
121 |
+
<div class="subtitle-text">Discover masterpieces from one of the world's premier art collections through an elegant and intuitive interface.</div>
|
122 |
"""
|
123 |
)
|
124 |
|
|
|
160 |
outputs=[gallery, info]
|
161 |
)
|
162 |
|
163 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|