Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -88,120 +88,8 @@ async def generate_predictions(book_name, author, language_choice, detail_option
|
|
88 |
|
89 |
|
90 |
return image_links, combined_summary, telegraph_url
|
91 |
-
css = """/* Base styling to set the overall look and feel */
|
92 |
-
|
93 |
-
body {
|
94 |
-
background-color: #f5f5f5;
|
95 |
-
font-family: 'Arial', sans-serif;
|
96 |
-
line-height: 1.6;
|
97 |
-
color: #333;
|
98 |
-
}
|
99 |
-
|
100 |
-
/* Styling for headers, mimicking Notion's typography */
|
101 |
-
|
102 |
-
h1, h2, h3, h4, h5, h6 {
|
103 |
-
font-weight: 500;
|
104 |
-
margin-top: 24px;
|
105 |
-
margin-bottom: 16px;
|
106 |
-
}
|
107 |
-
|
108 |
-
h1 {
|
109 |
-
font-size: 2em;
|
110 |
-
}
|
111 |
-
|
112 |
-
h2 {
|
113 |
-
font-size: 1.75em;
|
114 |
-
}
|
115 |
-
|
116 |
-
h3 {
|
117 |
-
font-size: 1.5em;
|
118 |
-
}
|
119 |
-
|
120 |
-
/* Input fields styling */
|
121 |
-
|
122 |
-
input, select, textarea {
|
123 |
-
background-color: #ffffff;
|
124 |
-
border: 1px solid #e1e4e8;
|
125 |
-
border-radius: 5px;
|
126 |
-
padding: 10px 15px;
|
127 |
-
font-size: 14px;
|
128 |
-
width: 100%;
|
129 |
-
box-sizing: border-box;
|
130 |
-
transition: border-color 0.3s;
|
131 |
-
}
|
132 |
-
|
133 |
-
input:focus, select:focus, textarea:focus {
|
134 |
-
border-color: #6366F1;
|
135 |
-
outline: none;
|
136 |
-
box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
|
137 |
-
}
|
138 |
-
|
139 |
-
/* Button styling */
|
140 |
-
|
141 |
-
button {
|
142 |
-
background-color: #6366F1;
|
143 |
-
color: #ffffff;
|
144 |
-
border: none;
|
145 |
-
border-radius: 5px;
|
146 |
-
padding: 10px 20px;
|
147 |
-
cursor: pointer;
|
148 |
-
transition: background-color 0.3s, transform 0.3s;
|
149 |
-
font-size: 16px;
|
150 |
-
}
|
151 |
-
|
152 |
-
button:hover {
|
153 |
-
background-color: #5555d6; /* Slightly darker shade for hover */
|
154 |
-
}
|
155 |
-
|
156 |
-
button:active {
|
157 |
-
transform: scale(0.98); /* Slight scale down for a press effect */
|
158 |
-
}
|
159 |
-
|
160 |
-
/* Output cards styling */
|
161 |
-
|
162 |
-
.output-card {
|
163 |
-
background-color: #ffffff;
|
164 |
-
border-radius: 5px;
|
165 |
-
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
|
166 |
-
padding: 20px;
|
167 |
-
margin: 20px 0;
|
168 |
-
}
|
169 |
-
|
170 |
-
.output-card img {
|
171 |
-
max-width: 100%;
|
172 |
-
border-radius: 5px;
|
173 |
-
}
|
174 |
-
|
175 |
-
/* Styling for links */
|
176 |
-
|
177 |
-
a {
|
178 |
-
color: #6366F1;
|
179 |
-
text-decoration: none;
|
180 |
-
transition: color 0.3s;
|
181 |
-
}
|
182 |
-
|
183 |
-
a:hover {
|
184 |
-
color: #5555d6;
|
185 |
-
}
|
186 |
-
|
187 |
-
/* Styling for lists */
|
188 |
-
|
189 |
-
ul, ol {
|
190 |
-
padding-left: 20px;
|
191 |
-
}
|
192 |
-
|
193 |
-
li {
|
194 |
-
margin-bottom: 10px;
|
195 |
-
}
|
196 |
-
|
197 |
-
/* Additional styling for other elements can be added as needed */
|
198 |
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
"""
|
204 |
-
with gr.Blocks(title="π BookMindAI", css=css).queue() as demo:
|
205 |
|
206 |
with gr.Row():
|
207 |
with gr.Column():
|
|
|
88 |
|
89 |
|
90 |
return image_links, combined_summary, telegraph_url
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
+
with gr.Blocks(title="π BookMindAI", theme=gr.themes.Base()).queue() as demo:
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
with gr.Row():
|
95 |
with gr.Column():
|